Hi
I am trying to write a dump to save data from a table in an excel. But I am having trouble with this wierd data entry, here is an example what it looks like:
:4:"name";s:31:"Zusätzlicher Betreff Hydraulik";s:4:"type";s:4:"text";s:7:"options";s:0:"";s:9:"parent_id";s:1:"0";s:5:"value";s:0:"";}i:4;a:7:{s:2:"id";s:2:"17";s:4:"slug";s:22:"betreff-wasserabwasser";s:4:"name";s:23:"Betreff Wasser/Abwasser";s:4:"type";s:8:"checkbox";s:7:"options";s:250:"a:8: thats only a small part of it, but I think you get the idea. Alle the information I need is there, but it's hard to find because of the way it's coded.My approach was trying to find out if it would work with json decode, but I am not evan sure if that is what it is called.
This is my approach:
//query get data
$sql = mysql_query("SELECT * FROM wp_visual_form_builder_entries ORDER BY form_id ASC");
$no = 1;
$emparray = array();
while($result = mysql_fetch_assoc($sql)){
$row = $result['data'];
$emparray[] = $row;
echo $emparray;
json_decode( $emparray, true );
//json_encode($emparray, true);
foreach ($emparray as $v) {
echo "Current value of \$emparray ist gleich $v.\n";
}
But it still gives out the same format. [link removed]
Can you please lead me to the right direction? I have no Idea what to do. I would appreciate it!
Thank you!
Rilana