Here's my situation:
I have a MYSQL database with 2 fields: 'ID' and 'string'. The 'string' field stores strings in form of serialized arrays. So, to extract it back, I use this PHP code:
$rez=mysql_query("SELECT * FROM drawings") or die(mysql_error());
$array=array();
while($row=mysql_fetch_array($rez))
{
$array[]=unserialize($row['string']);
}
Now my $array variable should contain an array of arrays, right? Assuming I did that correctly, I then echo $array;
so my ajax call catches it inside the return_data, like this:
var return_data = hr.responseText;
Just to test if I can extract a value, I then tried implementing the following code, but it doesn't seem to work:
var arr = return_data.split(",");
var sub_arr = arr[0].split(",");
alert(sub_arr[0]);
What am I doing wrong?
Additional info:
I am basically storing a bunch of coordinates inside the MYSQL database, each row being a separate array of coordinates, for example (12,13,14,16,17,20) - these would be 3 "points" contained in one row.
Then I'm using an ajax call to extract all the records from the database in a form of array, which contains arrays of multiple numbers (I know that each 2 neighboring numbers make up one point).
EDIT:
The chrome javascript console outputs:
Error in event handler for 'undefined': Cannot read property 'disable_serps_pos_numbers' of undefined TypeError: Cannot read property 'disable_serps_pos_numbers' of undefined at BasePlugin.GooglePlugin.getSomeCorePrefs (chrome-extension://akdgnmcogleenhbclghghlkkdndkjdjc/content_scripts/google.js:129:48) at chrome-extension://akdgnmcogleenhbclghghlkkdndkjdjc/lib/lib.js:44:25 at miscellaneous_bindings:287:9 at Event.dispatchToListener (event_bindings:356:21) at Event.dispatch_ (event_bindings:342:27) at Event.dispatch (event_bindings:362:17) at Object.chromeHidden.Port.dispatchOnMessage (miscellaneous_bindings:253:22)