String Pad Help
Posted: Sun Jul 04, 2004 6:54 pm
Does anyone have any ideas on why this won't work? I'm pulling a variables from the DB and I want to display them in a list evenly spaced out. But the str_pad function does not seem to be working so I must be doing something wrong:
Code: Select all
// Display member list for private message selection
while ($row_add = mysql_fetch_array($result_add))
{
echo ('<option value="'.$row_add['user_id'].'">'.str_pad($row_add['username'],35).' | '.str_pad($row_add['storename'], 25).' | '.str_pad($row_add['companyname'], 25).'</option>');
}