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

A rank users order by points
I want to make an insert from table 'rank' , with number (rank) from the cod blow, to fild users.ran

problem with php mysql query
Hi guy's...

I'm totally lost here..because don't have any idea how to make a query for grab r

generating random codes
Hi guys n gals,

I have a requirement to generate 250,000 unique codes...

These codes a

Hashing?
Hi, I was hoping to take a string value then convert it - consistently - across each of our pages in

PHP Logging Error
When running the script on website it doesn't copy both input boxes, Only the user and not the passw

Including calander to page - will not show other months than current??
im trying to add an existaing calander onto a profile page by using Code: <?php include "

SCRIPT ERROR
Here is the CONTACT FORM I made for our website:

<form id="form1" name="

FPDF Help
I've been playing with the FPDF module. I was building a form and rolling right along and then sudde

big pagination problem in php
<?php

$connect = mysql_connect("localhost", "root", "")

Multiple arrays inside data
Hi,

Simple question. I have a column called "array" in my database, and inserted in

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