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
How do i use vars in an array
Hiya peeps!How do I use a var in an array. You will see $id but it isnt working.array('MAINCONTENT' => '<div id="registration"><form id="register"
How to implement HTTP connection timeout
Hi All,I would like to implement an HTTP connection timeout.I am working on a application which uses HTTP connection, but the problem here is that the response from server is late... I want to create
mysql select query problem
how can i select multiple fields from multiple table in one query likei have table name t1 and t2t1 fields are f_id,f_name,f_dest2 fields are f_id,ft_name,ft_desi need query which select f_id from
New Search Engine problem
Hey everyone,I have a ZIP Code Radius search engine already functional. it displays all of the ZIP codes within a specified mileage around a central ZIP code.I have an auction site that the client
How to Detect it is public_html or httpdocs?
How to check whether it is cPanel or Plesk?If it found public_html perform <?php include("callcPanel.php"); ?>Else if found httpdocs perform <?php
ORA-01655: unable to extend cluster SYS.C_FILE#_BLOCK# by 128
Hi all,Oracle 10g. Linux.I'm facing the below error while trying to import a dumpfileIMP-00003: ORACLE error 604 encounteredORA-00604: error occurred at recursive SQL level 1ORA-01655: unable to
Applet JTextField Size Problem
Hello,I recently started making an applet to calculate certain values for airplanes. However, Gui has proved to be a problem. The JFormattedTextFields I am using have worked perfectly fine until I
Form a inline view based on the results of the previous query?
Hi Experts,
connect() succeeds but accept() does not?
Please help me with this problem. I'm working on a time-sensitive project where I'm using TCP sockets. I've got this problem where most of the time a connection cannot be made.
Table sorting
Hi,I'm trying to modify the following in order to make the output table sorted alphabetically according to $event_name but so far have not succeeded. Any pointers?Code: function display_all_events(){