PHP Newbie problem - Parse error: syntax error, unexpected '=', expecting T_VARIABLE or '$' -
PHP Newbie problem - Parse error: syntax error, unexpected '=', expecting T_VARIABLE or '$' -
new php, doing tutorial utilize php on server side connect flex. have typed in code video tutorial below can't seem work me. plan set longitude , latitude info sql database, format xml , pull flex php code follows
<?php mysql_connect("localhost", "root", ""); mysql_select_db("demo"); $result = mysql_query("select * maps"); echo "<?xml version=\"1.0\" ?><map>"; while($row = mysql_fetch_assoc($result)) { echo "<loc><lat>" . $row["lat"] . "</lat>"; echo "<lon>" . $row["lon"] . "</lon>"; echo "<name>" . $row["name"] . "</name></loc>"; } echo "</map>"; ?> and error receive is:
parse error: syntax error, unexpected '=', expecting t_variable or '$' in c:\wamp\www\afghan_mapping-debug\map.php on line 10
i have checked , double checked open brackets or quotes can't see any. i'm using wamp.
if can create sense of i'd appreciate it,
thanks
i can't tell if it's posts formatting, way it's interpreting line before it: echo "";
typically, line number error associated line/statement after real error is, because when get's line 10, realizes somethings not right based on interpreted previous line. funny, that's how i've noticed goes.
php
Comments
Post a Comment