I think you can get what you want by ‘unserializing’ the first element of the array:
$string = unserialize($our_children[0]);
$array = unserialize($string);
$data = $array[0];
echo "Name: $data->Name Age: $data->Age";
(There may be a more elegant way to do this.)
Oh thanks,
I found out about the unserialize part. Been plugging away at it this morning.
$children = unserialize($our_children[0]);
Didn’t know about the part in the code you wrote where I can array the unserialize string.
So I messed with code till I came up with this:
foreach ( $children as $child ) {
echo '<tr><td>'. $child[Name].'</td><td>'. $child[Age] .'</td><td colspan="3">'. $child[Sex] .'</td></tr>';
}
But thanks for your tidbits.
Do you know how I can split this?
I home educate my children or someone else’s (registered or enrolled),I run a business that benefits home education families and I would like to list it in the Member Directory and Service Guide
the entry in the user meta is
[who_i_am] => Array ( [0] => I home educate my children or someone else’s (registered or enrolled),I run a business that benefits home education families and I would like to list it in the Member Directory and Service Guide )
tried this but it is not working
$i_am = explode(",", $who_i_am);
?>
<li><?php echo $i_am; ?></li>
<?php