Sponsored Content
Top Forums Programming php: Need little help in Coding Post 302706043 by AimyThomas on Wednesday 26th of September 2012 03:27:21 AM
Old 09-26-2012
php: 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; "

Code:
<?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

Moderator's Comments:
Mod Comment Please use code tags next time for your code and data.

Last edited by radoulov; 09-26-2012 at 09:20 AM..
 

6 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

can I use this coding

I apologise because I had pasted this question in the newbies forum first (because i am a bit of a newbie) but thought it might be better suited in here if i have to sepearate parameters can I use this syntax especially the or part (||) and is this correct if (6 Replies)
Discussion started by: w33man
6 Replies

2. Programming

where i get coding for networking in C?

hai, this is nagalakshmi. i have a question in Unix C. i need the coding for the file transfer and simulation of protocols in C where i get the coding? (2 Replies)
Discussion started by: xpertlakshmi
2 Replies

3. AIX

need help for coding this logic

contact me on <email address deleted> or <email address deleted> (1 Reply)
Discussion started by: suprithhr
1 Replies

4. Shell Programming and Scripting

Need help with coding

HI, Can some one guide me how to make changes to the script below so that it can load the history of a program to IT server ? Format of data: YYYYMMDD065959.dsk.log YYYYMMDD235959.dsk.log currently both are loaded together. Need to separate them as above format. Thanks in advance. ... (1 Reply)
Discussion started by: crazydude80
1 Replies

5. Windows & DOS: Issues & Discussions

Need help with coding

HI, Can some one guide me how to make changes to the script below so that it can load the history of a program to IT server ? Format of data: YYYYMMDD065959.dsk.log YYYYMMDD235959.dsk.log currently both are loaded together. Need to separate them as above format. Thanks in advance. ... (2 Replies)
Discussion started by: crazydude80
2 Replies

6. Shell Programming and Scripting

Coding the cron

how to write a cron that runs for every 2 minute * * * * * emp.sh but it is executing for every minutes. how can i make it to run for only 10 times for in a day (4 Replies)
Discussion started by: azherkn3
4 Replies
exfalso(1)						      General Commands Manual							exfalso(1)

NAME
exfalso - audio tag editor SYNOPSIS
exfalso [ directory ] DESCRIPTION
Ex Falso displays and edits audio metadata tags. Supported formats include MP3, Ogg Vorbis, FLAC, Musepack (MPC), WavPack, and MOD/XM/IT. This manual page is only a short reference for Ex Falso. Complete documentation is available at http://code.google.com/p/quodli- bet/wiki/Guide. OPTIONS
Ex Falso may be given a directory to open on the command line. TIED TAGS
Many places in Ex Falso allow you to use "tied tags". Tied tags are two tag names joined together with a "~" like "title~version" or "album~part". Tied tags result in "nice" displays even when one of the tags is missing; for example, "title~version" will result in Title - Version when a version tag is present, but only Title when one isn't. You can tie any number of tags together. RENAMING FILES
Ex Falso allows you to rename files based on their tags. In some cases you may wish to alter the filename depending on whether some tags are present or missing, in addition to their values. A common pattern might be <tracknumber>. <title~version> You can use a '|' to only text when a tag is present: <tracknumber|<tracknumber>. ><title~version> You can also specify literal text to use if the tag is missing by adding another '|': <album|<album>|No Album> - <title> See http://code.google.com/p/quodlibet/wiki/Guide_Renaming. BUGS
See http://code.google.com/p/quodlibet/issues/list for a list of all currently open bugs and feature requests. AUTHORS
Joe Wreschnig and Michael Urman are the primary authors of Ex Falso. SEE ALSO
http://code.google.com/p/quodlibet/wiki/Guide, http://code.google.com/p/quodlibet/wiki/FAQ February 20th, 2006 exfalso(1)
All times are GMT -4. The time now is 10:17 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy