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 start of the week).
Set of timestamps....
Code: [Select]1255482000
1255483800
1255485600
1255487400
1256086800
1256088600
1256090400
1256092200
1256691600
1256693400
1256695200
1256697000
1257300000
1257301800
1257303600
1257305400
1257904800
1257906600
1257908400
1257910200
1258509600
1258511400
1258513200
1258515000
1259114400
1259116200
1259118000
1259119800
Currently the code looks like this, but having trouble getting round the logic of doing this...
Code: [Select]<?php
while ($sqlresults = mysql_fetch_array($results)) {
$compare = strtotime(date('d F Y',$laststamp)." next Sunday");
echo $sqlresults['timestamp'].'
';
if ($sqlresults['timestamp'] != $laststamp) {
if ($compare > $laststamp) {
#HTML CODE
}
}
$laststamp = $sqlresults['timestamp'];
}
?>
But at the moment it just puts HTML code inbetween every time
LSB (PHP 5.3) problem with static value!
hello,i'm having a problem. static::$text variable gets lost at some point. can someone please correct and explain it to me?Line number On/Off| Expand/Contract <?phpclass A { protected
Creating a unique 'control panel' for each user
Hi there,I'm thinking of designing a site that will allow users to sign up and have their own unique 'control panel'.I just need some pointers on the logic behind this design, specifically:How can I
Change of partner analyse in sales orders
Hello,
Having problemswith multithreading and prime numbers
I have an assignment when I'm suppose to do the following:
Login script (probably a simple error)
dbConfig.phpCode: <?// Replace the variable values below// with your specific database information.$host = "localhost";$user = "username";$pass = "password";$db
send() and recv() parameters confusion
On server Side:
Two warning messages
Quote<b>Warning</b>: mysql_real_escape_string() expects parameter 1 to be string, array given in
[function.file]: failed to open stream: No such file or directory
Okay I wrote this little script to upload a csv file that is located on my webhosts server to a mysql database. Something is wrong because I am getting the following error:Warning:
Checking if variable is 0 as opposed to NULL/Empty...
I'm trying to write some code that will retrieve a user's access level from my database and if it doesn't return any values then I want to set the access variable to 2. I'm using... $access_id =
Filtering for a phrase using pregmatch
Here is my code which looks for addresses which start with ' src=" 'Code: [Select]preg_match_all('#src="(http://[^"]+)#', $value, $matches)I want to modify this so that it only returns