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.
Just do:
$arg['textarea']['body']="Hello";
foreach($arg['textarea'] as $row) {
echo $row."";
echo $arg['textarea']['body']."";
}
The $row is an string, and what you are trying to do the $row['body']. And
php will translate 'body' to 0 in this, I do not know why :)
Try
echo $row['bod
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