In article 01ae01c24f4f$51dc7bd0$b50a@web18, [EMAIL PROTECTED] says...
i want Y (year format) printed on my php script (looping), i already tried
it but i got same Year format (ex 1978) in all row in my table
my loop script is:
$query = (select * from table);
$result = mysql_query($query);
while ($row = mysql_fetch_row($result))
$number = mysql_numrows($result);
$i = 0;
while ($i $number):
$date = mysql_result($result, $i,$date);
if ($i%2 == 0){
echo b$date/b;
if ($i%2 == 0){
echo $date;
}
$i++;
ENDWHILE;
If the date is stored in one of MySql's date type fields, you could use
the mysql DATE_FORMAT function to format your date.
I think the logic of your looping above is a bit suspect??
--
David Robley
Temporary Kiwi!
Quod subigo farinam
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php