Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

PHP Forum


You are currently viewing our PHP Forum as a guest. Please register to participate.
Login



Freelance Jobs

Reply
Bullet list from MySQL / PHP
Old 06-13-2007, 07:31 PM Bullet list from MySQL / PHP
Junior Talker

Posts: 2
Trades: 0
I have a mysql database field that contains names that are seperated by commas (John, Paul, Jill, Jake) I need to dispaly them as bullets like in the sample below.
  • John
  • Paul
  • Jill
  • Jake
I have seen this done on as ASP page but need to know how to do it with PHP. Any help and I will be thankfull.
chapel is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 06-14-2007, 12:42 AM Re: Bullet list from MySQL / PHP
304558580's Avatar
Novice Talker

Posts: 6
Trades: 0

PHP Code:
$str 'John, Paul, Jill, Jake';
 
$strarray explode(",",$str);
 
$m count($strarray);
 
for (
$i=0;$i<$m;$i++){
 
echo 
"<li>$strarray[$i]</li>";
 

__________________
Network future success

Last edited by 304558580; 06-14-2007 at 12:44 AM..
304558580 is offline
Reply With Quote
View Public Profile Visit 304558580's homepage!
 
Old 06-14-2007, 07:52 AM Re: Bullet list from MySQL / PHP
solomongaby's Avatar
Webmaster Talker

Latest Blog Post:
How Do You Find Music Online ?
Posts: 522
Name: Gabe Solomon
Location: Romania
Trades: 1
smaller version
Quote:
$str = 'John, Paul, Jill, Jake';

$strarray = explode(",",$str);

foreach (
$
strarray as $s){

echo
"<li>$s</li>";

}
__________________
If you like my posts ... TK is appreciated:)

Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
solomongaby is offline
Reply With Quote
View Public Profile Visit solomongaby's homepage!
 
Old 06-14-2007, 08:26 AM Re: Bullet list from MySQL / PHP
Junior Talker

Posts: 2
Trades: 0
thanks
chapel is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to Bullet list from MySQL / PHP
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.34799 seconds with 12 queries