Created
March 11, 2014 13:26
-
-
Save olupotd/9485545 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<? | |
$value[] = null; | |
$result = mysql_query("SELECT * FROM users WHERE uname='$uname'") or die(mysql_error()); | |
$row = mysql_fetch_array($result); | |
if($row) | |
{ | |
$title = $row['title']; | |
$val = unseralize($row['values']); | |
for ($val as $v){ | |
$value[] = unseralize($v); | |
} | |
/* | |
Serializing data especially binary data is not safe. I'd suggest you use json. it's much safer and easier to manipulate. | |
check this below: | |
$orilang = json_decode($lang,true); | |
orilang contains the array | |
*/ | |
echo $orilang['photo']; | |
} | |
else{ | |
} | |
for ($i = 0; $i < count($value); ++$i) | |
{ | |
echo $value[$i]; | |
} | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment