PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
Moderator: General Moderators
ianhull
Forum Contributor
Posts: 310 Joined: Tue Jun 14, 2005 10:04 am
Location: Hull England UK
Post
by ianhull » Sun Feb 18, 2007 8:12 pm
Hi Guys,
I would like to list the values of an array like this.
Code: Select all
$a = array("me", "and", "mydog");
//me, and, mydog
please help.
Thanks
ianhull
Forum Contributor
Posts: 310 Joined: Tue Jun 14, 2005 10:04 am
Location: Hull England UK
Post
by ianhull » Sun Feb 18, 2007 8:24 pm
nevermind
foreach
ianhull
Forum Contributor
Posts: 310 Joined: Tue Jun 14, 2005 10:04 am
Location: Hull England UK
Post
by ianhull » Sun Feb 18, 2007 8:52 pm
Still stuck
Code: Select all
foreach ($varName as $varNames) {
$varNames = $varNames.", ";
}
how do i get this out of what I have here?
"me, and, mydog"
notice I need to remove the last comma
thanks
ianhull
Forum Contributor
Posts: 310 Joined: Tue Jun 14, 2005 10:04 am
Location: Hull England UK
Post
by ianhull » Sun Feb 18, 2007 8:56 pm
Hey thanks
implode();