A Quick Question about and Error [SOLVED]

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
User avatar
tecktalkcm0391
DevNet Resident
Posts: 1030
Joined: Fri May 26, 2006 9:25 am
Location: Florida

A Quick Question about and Error [SOLVED]

Post by tecktalkcm0391 »

I keep getting:
Parse error: syntax error, unexpected '=' in /home/users-map.php on line 33
With:

Code: Select all

$location = '';
if(isset($loc_info['CITY'])){
			$location. = ''.$loc_info['CITY'].', ';
		}
Anyone can tell me why?
Last edited by tecktalkcm0391 on Fri Jun 23, 2006 1:07 am, edited 1 time in total.
User avatar
Oren
DevNet Resident
Posts: 1640
Joined: Fri Apr 07, 2006 5:13 am
Location: Israel

Post by Oren »

Remove the space between the '.' to the '=' :wink:
User avatar
tecktalkcm0391
DevNet Resident
Posts: 1030
Joined: Fri May 26, 2006 9:25 am
Location: Florida

Post by tecktalkcm0391 »

Thanks!
User avatar
RobertGonzalez
Site Administrator
Posts: 14293
Joined: Tue Sep 09, 2003 6:04 pm
Location: Fremont, CA, USA

Post by RobertGonzalez »

Just cleaning it up a bit...

Code: Select all

<?php
$location = '';
if(isset($loc_info['CITY'])){
    $location = $loc_info['CITY'] . ', ';
}
?>
Post Reply