[Solved] Warning on using strtotime in php? [closed]

If you look at the documentation for mysql_result you’ll see that it expects the query resource as the first parameter, the row number as the second parameter, and (optionally) the field name or offset as the third parameter. You’re not using the function in anyway that even resembles its purpose. Edit: Based on your comment … Read more

[Solved] what is the most efficient way to get 1 or 2 day before the first day of week number and year in php with native functions [closed]

strtotime(‘2012W01 – 2 days’) for Saturday and strtotime(‘2012W01 – 1 day’) for Sunday since the week call is always going to return you a Monday. 2 solved what is the most efficient way to get 1 or 2 day before the first day of week number and year in php with native functions [closed]

[Solved] what is the most efficient way to get 1 or 2 day before the first day of week number and year in php with native functions [closed]

Introduction The question of how to get the day before the first day of a week number and year in PHP with native functions is a common one. Fortunately, there is an efficient way to do this using the native functions of PHP. This article will explain the most efficient way to get 1 or … Read more

[Solved] PHP 01/01/1970 Issues with Date Fields

Use below code $current=”DATE OF : 23/03/1951 BENCH:”; $DATEOF = preg_replace(‘/(.*)DATE OF (.*?)BENCH:(.*)/s’, ‘$2’, $current); if (!is_null($DATEOF)) { $oldDate = $DATEOF; $oldDateReplace = str_replace(array(‘!\s+!’, ‘/^\s+/’, ‘/\s+$/’,’:’), array(”,”,”,”), trim($oldDate)); $date=””.$oldDateReplace.”; $timestamp = strtotime($date); if ($timestamp === FALSE) { $timestamp = strtotime(str_replace(“https://stackoverflow.com/”, ‘-‘, $date)); } echo $newDateM = date(“m/d/Y”,$timestamp); echo $newDate = date(“F j, Y”,$timestamp); }else{$newDate=””;} 5 … Read more