help! stuck and confused

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

Locked
raj___
Forum Newbie
Posts: 1
Joined: Wed Jul 09, 2008 10:26 am

help! stuck and confused

Post by raj___ »

hey guys i'm having a problem identifying three errors in this php code can anybody help? thanks in advance


<?php (in bold)
/* This program


*/

$username = 'bob' //
$weight_lbs = 140;

print 'convert your weight'; //

$weight_kgs = ($weight_lbs / 2.2 ;


print 'bob your weight in kilograms is 60kgs';
>
User avatar
jayshields
DevNet Resident
Posts: 1912
Joined: Mon Aug 22, 2005 12:11 pm
Location: Leeds/Manchester, England

Re: help! stuck and confused

Post by jayshields »

That is blatantly a homework assignment or something. The most basic knowledge of any sort of programming language would identify the 3 errors.
User avatar
Frozenlight777
Forum Commoner
Posts: 75
Joined: Wed May 28, 2008 12:59 pm

Re: help! stuck and confused

Post by Frozenlight777 »

were you drunk when you 'tried' writing this? Chances are you won't even respond back
User avatar
Benjamin
Site Administrator
Posts: 6935
Joined: Sun May 19, 2002 10:24 pm

Re: help! stuck and confused

Post by Benjamin »

Yeah this is a weird one. There are numerous errors. Nothing that isn't blatantly noticeable with a decent editor... or without one for that matter.
Locked