FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » Imported messages » comp.lang.php » values not changing
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
Re: values not changing [message #181561 is a reply to message #181557] Tue, 21 May 2013 21:17 Go to previous messageGo to previous message
Denis McMahon is currently offline  Denis McMahon
Messages: 634
Registered: September 2010
Karma:
Senior Member
On Tue, 21 May 2013 14:17:13 -0400, richard wrote:

> What am I missing?

Pick from:

1) A possible issue with using attribute names instead of attribute name
strings that has already been mentioned to you once.

2) A broken numeric comparison that's been explained elsewhere.

3) Sufficient understanding of php and javascript to safely generate the
latter using the former.

4) All of the above.

My money is on 4.

The data you are assembling looks like json data. For json data, you need
to quote the attribute name string. The json needs double quoted strings,
so as you also need to use php double quoted strings to preserve variable
substitution, you need to use escaped double quoted strings for the json
string values.

echo "{\"image\":\"\",";
echo "\"title\":\"{$vid[0]}\",";
echo "\"file\":\"http://www.youtube.com/watch?v={$vid[2]}\",";
echo "\"description\":\"{$year} # {$number} - {$vid[1]}\"},";

--
Denis McMahon, denismfmcmahon(at)gmail(dot)com
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: insert PDF table in database
Next Topic: Got it working finally
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Wed Nov 27 10:43:17 GMT 2024

Total time taken to generate the page: 0.03614 seconds