Jump to content

[SOLVED] Simple Echo help


iceblox

Recommended Posts

HI Guys,

 

I have a simple echo query what i need it to do is on the last row not to print the "|" Seperator as in my ajax query im getting a blank option.

 

Can someone help me with this please?

 

<?php


$query = "SELECT * FROM deals WHERE MakeName = '$id' GROUP BY ModelName ORDER BY ModelName ASC";

$result = mysql_query($query);

if (mysql_num_rows($result) > 
                            0)
{

while($row = mysql_fetch_row($result))
{

echo '' . $row[10] . ',' . $row[12] . '|';

}

}
else
{
echo '';
}


?>

 

Thanks in advance

Link to comment
https://forums.phpfreaks.com/topic/75378-solved-simple-echo-help/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.