Domain Name Forum  
Domain Name Coupons

Domain Name Forum

Domain Name Appraisals

Expired Domains

Domain Name Tutorials

Parking & Traffic Monetization

Domain Registration Reviews and rating

Domain Name Offers And Requests

Go Back   Domain Name Forum > Web Design & Development > Programming
Register FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 09-26-2012, 02:11 AM
jackwebso jackwebso is offline
Member
 
Join Date: Jun 2012
Posts: 34
Default Need little help in Coding

I have been starting

What wrong with this? ive been staring at it but not coming up with anything

im getting syntax error, unexpected T_RETURN where it says " return $result; "

<?php



function add_subtract ($value1, $value2) {
$add = $value1 + $value2;
$subtract = $value1 - $value2;
$result = array($add, $subtract)
return $result;
}

$resultArray = add_subtract (10,5);
echo "Add: ".$resultArray[0];
echo "Subract: " .$resultArray[1];

?>


Thanks in advance
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 02:39 PM.

| Webmaster Forum | | Domain Name Forum |



Powered by vBulletin®
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.