[FX.php List] Seperating by comm instead of new line
Gjermund Gusland Thorsen
ggt667 at gmail.com
Sun Jul 20 05:14:41 MDT 2008
foreach( $allNamesResult[ 'data' ] as $key => $allNamesData ) {
$names[] = explode( ',', $allNamesData['task'][0] );
}
foreach( $names as $v ) {
echo $v;
}
2008/7/20 william.downs <william.downs at gmail.com>:
> Hi There,
>
> I am trying to do something so very simple - yet am having problems with.
> Looked in all my PHP books, but can't work it out.
>
> I need to extract the contents of one field, separated by a comma, instead
> of being on a new line.
>
> foreach( $allNamesResult[ 'data' ] as $key => $allNamesData )
> {
> $name = $allNamesData['task'][0];
> echo $name
> }
>
> This will give me :
>
> John
> Richard
> Brian
>
> I want John, Richard, Brian
>
> Can someone please tell me what to do ? And then smack me on the head ?
>
> Many thanks in Advance,
>
> William
> _______________________________________________
> FX.php_List mailing list
> FX.php_List at mail.iviking.org
> http://www.iviking.org/mailman/listinfo/fx.php_list
>
More information about the FX.php_List
mailing list