Jump to content

key value pairing from string


sandy1028

Recommended Posts



var content = "javascript:(function() {document.open();document.write("<script>abc = '37418';adt = '484';h = '585';w = '111';nel = '12482,100';test = 'on';num = '1';</script><script type='text/javascript' src='http://abc.js'></script>");document.close();})()";

abc = '37418';

adt = '484';

 


 

Can you please help in  extracting the key and value pairs in the string and print the value of particular value for the key. Please help

 

 

 

 

Link to comment
https://forums.phpfreaks.com/topic/289670-key-value-pairing-from-string/
Share on other sites

 



var content = "javascript:(function() {document.open();document.write("<script>abc = '37418';adt = '484';h = '585';w = '111';nel = '12482,100';test = 'on';num = '1';</script><script type='text/javascript' src='http://abc.js'></script>");document.close();})()";


 

In the variable "content", I want to get the all the values which has 

aaa = 'xyx' ,etc. 

 

When called using a['aaa'] then output should give the proper result as "xyx".

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.