Hello guys
*Note: this is a php question not MySQL question, please do not move it to mysql section! Thank you.
anyway, I have a record from the database as 2009-12-31 23:59:59
I needed to when ever I pull that record, I need to change it to mktime() format, so I can do so many things with it.
I tried to change it through preg_replace!
$str = "2009-10-13 11:30:15"; // an example only of the format data pulled from the DB!
$pat = '/(d{4})-(d{2})-(d{2}) (d{2}):(d{2}):(d{2})/';
$replace = 'mktime(4 ,5 ,6 ,2 ,3 ,1)';
echo preg_replace($pat, $replace, $str); // which give me the exact string of mktime(#,#,#,#,#,#)!
Please help me out!
Thank
Hi, explode and strstr.
Hi, I seem to be confused about the strstr function, eg. i have a string like:"a.b.c.d.e.f""a.b.c.d.e"I always want it to split at the second "." from the end, so
Problem!
I have another problem, when i run this code i get this error "Parse error: syntax error, unexpected T_ELSE in /home/a1408362/public_html/admin.php on line 41". I can't see why in the code
couldn't connect to your database
Hello I am new to php mysqlActually i have read A tutorial on nettuts"http://net.tutsplus.com/tutorials/php/create-a-signup-form-with-email-confirmation/"According i copy all source code
getting weird error..
okay, I'm getting an error on this particular function, something about the syntax in the mysql LIMIT statement, but as far as I can see I have it right, currently using easymysql3.0 as test server,
Array question
Does anyone know how to create a program that takes the $ amount for 8 different departments and give the total amount of sales?
POST into Array problem
Hi Chaps,I have a repeat region, displaying rows of data: jobid, fromtable, translatorchargeIn each row there is an input field to enter a cost for each job 'charge'.//INPUT - TRANSLATOR CHARGECode:
Displaying data from database into a 2 dimensional table
Good day!I'm a beginner in PHP and I'm not expecting a full coding for this qestion. I'm just looking for hints and pointers as to how to solve this problem so that I can learn it myself.I have a
is_dir() problem
Hello,I'm buidling a php scripts that dynamically get's subfolders from a specific folder.my code:Code: <?php if(isset($button)){ $opendirdepot =
Best PHP Documentation generator
Hello guys!I would like to hear from you what is the best PHP documentation generator. Personally I use PHPDocumentor.What about Doxygen? It seems that Doxygen and PHPDocumentor have a very slight
Advice on how to delete a mysql row using my form
Hi,I am very new to php and am struggling to work out how to delete a portfolio item (a row from my database using my form which is here):