Getting a variable to work in function params


Posted on 16th Feb 2014 07:03 pm by admin

I have this fuction which is inside a class:

Code: public static function generateEmbedCode($callId, $width="425", $height="320", $swfobjectPath="SDK/js/swfobject.js", $inviteButton="1", $guestList="1", $observerMode="0", $displayName="$nick") {
Blah Blah
Did you know?Explore Trending and Topic pages for more stories like this.
}
What i need to do is grab some info and place it into a variable for $displayName="$nick" using:
Code: $memberid = (int)$_COOKIE['memberID'];
$sQuery = "SELECT * FROM `Profiles` WHERE `ID` = '$memberid'";
$result = db_res($sQuery);
while ( $p_arr = mysql_fetch_array( $result ) ) {
//get profile data
$nick = $p_arr['NickName'];
}
But I can't get it to work, my question is how can I get a variable to work inside the params of a function?? i hope this makes sense.

Thanks
No comments posted yet

Your Answer:

Login to answer
307 Like 8 Dislike
Previous forums Next forums
Other forums

imap: how to save a copy of sent emails to sent elements
Hello my friends,

I am writing an online emailing application with inbox outbox/sent elements

smart reading from a text file
Hello there fellow coders, i was wondering if one of you wouldnt mind helping me with this problem i

check how many commas the variable containing the query has between [i]select[/i
Hi...

iv made an sql table that contains id number - name of sql query and an sql query.
T

Simple code help with redirects
I am trying to figure out a redirect script that detects if the browser is IE 7 and if it does, redi

Stuck with preg_replace
Hi,

I'm trying to use preg_replace to remove part of the IP address submitted using a form on

foreach iterator
Hi Guys
Does the foreach loop have an inbuilt iterator ?

Syntax error
hi im having a little trobble with this script
-------------------------------------------------

From Header Showing 'Unkown' In Hotmail? Why?
Code: $to = $row_GetID['email_addr'].',sales@mywebaddress.co.uk';
$subject = 'Thank you for you

mr8m - reverse document
Friends,

I'm trying to reverse a document held by MIRO, but it reports the message balan

HTML Viewer HIDE scrollbar
How can I disable scrollbars in a HTML Viewer control? I can't hide them. Even i have enough space b

Sign up to write
Sign up now if you have flare of writing..
Login   |   Register
Follow Us
Indyaspeak @ Facebook Indyaspeak @ Twitter Indyaspeak @ Pinterest RSS



Play Free Quiz and Win Cash