Jump to content

Recommended Posts

The following code returns thousands of results separated by a semicolon;

 

while($getpostid_result=mysql_fetch_array($getpostid))
      {
         $postusername=$getpostid_result['username'];
         echo $postusername.";";
      }

the problem is it does not print everything in one row.it breaks into the nextline after if it encounters certain chatacters or some other reason.

I want it to able to print everything in one row irrespective of the number of results returned.

Other than suggesting you select the values using MySQL's TRIM() function, that's going to be hard to answer without knowing just what characters they are, and where they're located.

well they just break randomly without any reason at times.For example:

TJDaddy;gotjeep;FLHT_FXRS_YJ;jpwranglr9;sport;itsrich;OhYeah;RodeoRob;TNJeepMan;pm203;CETROV;'drack;ATeamer;Jeepchik;dooz;TJBrowder;dirtpilot;OverTheHandlebars;DCBerry;jeep

thrills;OwnAccord;tpaudet;aroberts;MarkK;

Not sure if a css fix will work.

echo "<span style=\"white-space:nowrap;\">";
while($getpostid_result=mysql_fetch_array($getpostid))
      {
         $postusername=$getpostid_result['username'];
         echo $postusername.";";
      }
echo "</span>";

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.