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
query based on 2 conditions
I want to select if the doc_type is either s OR f but this doesn't work:Code: [Select]$query2 = "SELECT * FROM members WHERE doc_type='s' && doc_type= 'f' ORDER BY
sendmail code suddenly not working
Hi Guys, I maintain 3 sites (including my own) I use the following code from a french webmaster that gave me permission to use it. He designed & coded one of them. Now the code seems to have
Big Problem!! Please help
Hi Guys,Im making a website for a friend have encountered a really annoying problem. When every i run the script below i get this error: "Parse error: syntax error, unexpected '}' in
noob question
i traying to do a php form with auto replay for both(me and the user who send me a mail),a using this codeCode: <?php$contact_name = $_POST['emp'];$contact_email =
Structure Question - One Table or One Table Per Record Set?
I have a web app (mySQL and PHP) which allows people to create an item with up to 200 records which I store in a single table. Any user subscribing to that item will be pulling up to 4 records from
Secure FTP
Hi experts,
Echo multiple lines of html code
Hi guys,I would like to know if there is a way to echo multiple lines of html codes. I intend to echo a form if a variable is set and nothing if it is not set. And right now, I echo each line of html
adding 0 to numbers
Hey guys i need to create a 00001 number in a loop. Is there a better way of forcing a 5 digit number then counting them and adding the missing zeros?
Breaking results into week blocks
I have a set of dates (and times), which are returned from a mySQL query.These usually span from 1-2 months and I need to be able to separate the results (using HTML) every sunday (monday being the
Port scanner problem
Hai recently i developed one app through which u can check the opened and closed ports under an ip address or domain.but there is a small error.if no port numbers are given then it should scan from