PHP

PHP
1 year ago

What is the difference between split() and explode()?

PHP
The PHP manual for split() says This function has been DEPRECATED as of PHP 5.3.0. Relying on this feature is highly discouraged...Use explode...
1 year ago

wordpress - is it possible to add one post with multiple custom post type

PHP
I have to create a module for admin where admin can manage the post. suppose i have to create 3 post types New added post type Entertainment Post ty...
1 year ago

PHP __get and __set magic methods

PHP
Unless I'm completely mistaken, the __get and __set methods are supposed to allow overloading of the → get and set. For example, the following ...
1 year ago

In Phpmyadmin edit values inserted in table is not working

PHP
If you see in the picture , i am not getting any option to edit inserted values in table. I wanted to edit here for ex , 'test_input' coloumn for the ...
1 year ago

How to delete element with DOMDocument?

PHP
Is it possible to delete element from loaded DOM without creating a new one? For example something like this: $dom = new DOMDocument('1.0', 'utf-8');...
1 year ago

using core php mail() to send via gmail SMTP

PHP
Is it possible to send mail in core php via gmail smtp without using any external class?
1 year ago

Laravel/Lumen event listener does not listen

PHP
I have a Lumen controller class that fires an event when a user is created. I am using an event dispatcher. The event gets fired as it should, but the...
1 year ago

php convert date to datetime

PHP
i need to convert a date in this format: November 28, 2009 to a mysql date format: 2009-28-11 what's the best method to convert the date using php...
1 year ago

How to declare a global variable in php?

PHP
I have code something like this: <? $a="localhost"; function body(){ global $a; echo $a; } function head(){ ...
1 year ago

PHP echo something based on day of month

PHP
I have written the following PHP, but it's only showing the '1st' date - not sure where I've gone wrong: if(date('j', $timestamp) === '1') echo "1st"...
1 year ago

Why does mysql HEX change binary column case?

PHP
The following query changes the case of the md5 column from lower to upper. The MD5 value was provided via PHP's md5() function, and I am using it in...
1 year ago

Empty result while creating a csv file

PHP
I have an array with keys and values that I want to email as an attachment in csv form. What I am trying is this: ... $mail->addStringAttachment(c...
1 year ago

How to sum data of row has same id

PHP
My query : "SELECT sent_who, sent_amount FROM game1 ORDER BY sent_who ASC;" Output : array (size=4) 0 => array (size=4) 'sent_who'...
1 year ago

how to write text field values into a text file before form submission using javascript

PHP
I'm new to Java script. I'm implementing some web pages. Now, i have TextBox fileds (for users to enter server ip,username and password),upload file...
1 year ago

Data Tables: brake with url

PHP
I have a situation with Data Tables that I don't understand: Problem: I have this rewriteRule: Rewriterule ^table/ table.php So, when I go to www...
1 year ago

how to sum rows of mysql ouput in php

PHP
I have a table that looks like id user_id white brown green other day month year week 6 54 5 5 2 ...
1 year ago

Use array to convert mysql dayofweek integers to weekday names in while loop?

PHP
I am trying to sum up the amount of money I use on the different days in the week. I keep an MySQL database with a timestamp for each time I use money...
1 year ago

Randomize SimpleXML object results

PHP
I want to randomize x (depending on $max) results below. Now the list is presented in order of the XML file the code is pointing to ($string). Any ide...
1 year ago

The best way to secure PHP script on the server

PHP
What is the best (easiest but efficient) way to protect PHP script on the server to let anyone to run it? Anyone who gets the URL address of my script...
1 year ago