keirosang / phpquery

Automatically exported from code.google.com/p/phpquery
0 stars 0 forks source link

Get the content of a javascript variable in the script tag #143

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. I have one value 
<script> 
imgp[1]="sample text";   
</script>

2. I need to get the value assigned to imgp[1];
3. I have used phpquery like bello
$other_img = pq('script')->find('imgp[1]').text();

But i did not find any output

What is the expected output? What do you see instead?

I need to have the out of the variables value "sample text";

Please use labels and text to provide additional information.

Original issue reported on code.google.com by id.email...@gmail.com on 11 Feb 2010 at 12:50