Forums / General Questions / How do I echo this so it shows the actual text

How do I echo this so it shows the actual text

Locked

Views: 957

Results 1 to 3 of 3
This thread is locked. New replies are disabled.
26 Jul 2006, 3:56 PM
#1
qhome avatar

qhome

Totally Zenned

Join Date:
Feb 2004
Posts:
1,702
Plugin Contributions:
5

How do I echo this so it shows the actual text

echo "products_description['" . $languages[$i]['id'] . "']";

I'm trying to echo this so that I could see the full text.

Currently it gives
products_description['1']

but should it give me more? like
products_description['1'][1]

or something. I think im missing something with the [id] part

26 Jul 2006, 4:03 PM
#2
merlinpa1969 avatar

merlinpa1969

Totally Zenned

Join Date:
Mar 2004
Posts:
13,031
Plugin Contributions:
4

Re: How do I echo this so it shows the actual text

by using " you are telling it to display exactly whats inside the quotes

try this

'products_description['" . $languages[$i]['id'] . "']';

Zen cart PCI compliant Hosting

26 Jul 2006, 4:29 PM
#3
qhome avatar

qhome

Totally Zenned

Join Date:
Feb 2004
Posts:
1,702
Plugin Contributions:
5

Re: How do I echo this so it shows the actual text

Thanks for your response Merlin. Not working quite yet tho:

I tried

echo 'products_description['" . $languages[$i]['id'] . "']';
it gave
Parse error: syntax error, unexpected '"', expecting ',' or ';'

Then I tried:
echo ('products_description['" . $languages[$i]['id'] . "']');
and it gives
Parse error: syntax error, unexpected '"'

-EDIT-

I got it.. its product_description[1] instead of ['1']. I just needed to know the actual name display so i could pass it to javascript.

Thanks