Code: [Select]
class person {
var $name = "Jimmy Goe";
function get_name(){
echo $this->name;
}
}
I am playing with this very small script that I made using a tutorial. I can get the script to echo out the name using the code above. What I don't get is why I can't do this
Code: [Select]class person {
var $name;
function get_name(){
$name = "Jimmy Goe"
echo $this->name;
}
}
then of course in my index page, I am calling it like this
Code: [Select$joe = new person();
$joe->get_name();
If you decide to answer this question, please be as detailed as possible, I am a newb as you can see and the more information you give or the simpler the explanation, the better.
Thanks for helping
Insert to MySQL inside foreach
Hey.I am parsing some html, and putting inside an html db.I need to create a randomized integer to be a unique identifier, and i chose just to use time().But I foreach the results, and inside here i
firefox wouldnt stream mp3 files completely from my php page
hi everyone,I have a php file trying to read and stream mp3 files. It works fine in IE but my problem is Firefox streams only 3 seconds of them.$direction =
Help with explandable category tree
I have the below query: SELECT l1.id as lev1_id,l2.id as lev2_id,l3.id as lev3_id,l1.category AS lev1, l2.category as lev2, l3.category as lev3 FROM categories AS l1LEFT JOIN categories AS l2 ON
script and html conflict in trying to create a header.
I have an error is occurring because of an html webpage with a "php require" at the top of the page calling a script. Somehow I'm having a problem with the html page and the script both
Must-Know Topics of PHP
Can you guys list the must-know topics of PHP. I am still a learner and I am trying to cover most of the important topics in PHP.
having probem inserting data into db table
hii have a table with following columns in itCode: candidate_id, degree, cgpa, instituteand i have a dynamic form with some javascript in it. the problem in php script i think not in js. this form has
Help =( !! Upload Pics [PHP script]
HelloI need help with a php script [MULTIPLE UPLOAD IMAGES] , where I want to add a feature (watermark the uploaded pictures) , thats mean its watermark & upload in the same time . look this
Comma seperated implode & modifying returned string.
I have a PHP post form that posts up to 4 variables. I need whatever variables are passed to be combined into one comma seperated string (eg variable1,variable2,variable3,variable4). This i can do
Calling strings from other php class
I have test1.php{$string1;$string2;....... //10 strings in this class $string10;}Another class test2.php{.........I want to use those 10 strings here, how should I do it?}
Filename like the user name
I am creating a form and storing the values in file. Could anyone please tell me how to write a code in php for creating a filename based on the user name as in the form.Thanks