On Mon, February 20, 2006 8:57 pm, jonathan wrote:
> I have the following construct:
>
> $arg['textarea']['body']="Hello";
>
>
>foreach($arg['textarea'] as $row)
>{
> echo $row['body']."";
> echo $arg['textarea']['body']."";
>
>}
>
> I would expect bo
jonathan wrote:
I have the following construct:
$arg['textarea']['body']="Hello";
foreach($arg['textarea'] as $row)
{
echo $row['body']."";
$row contains the _string_ 'Hello'.
the thing is you can use array-like notation to
get at the individual chars of a string.
']. And
php will translate 'body' to 0 in this, I do not know why :)
Try
echo $row['body']. $row[1]. $row[1]. $row[2]. $row[3]. $row[4];
It will probably echo Hello for you :)
/Peter
-Original Message-
From: jonathan [mailto:[EMAIL PROTECTED]
Sent: Tuesday, Feb
jonathan wrote:
I have the following construct:
$arg['textarea']['body']="Hello";
foreach($arg['textarea'] as $row)
{
echo $row['body']."";
echo $arg['textarea']['body']."";
}
I would expect both of them to output "Hello" but only the second does
4 matches
Mail list logo