Echoing a Variable from a Object


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

How do I get a variable from the new User Class to echo out in this clasS?

class MyApp
{
Did you know?Explore Trending and Topic pages for more stories like this.

function __construct()
{
global $dbHost;
global $dbUser;
global $dbPass;
global $dbName;

$this->DB = new Database;
$this->DB->connect($dbHost, $dbUser, $dbPass, $dbName);

$User = new User;

echo $User->login;
echo $this->User->login;

}


}

No comments posted yet

Your Answer:

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

pointer 102 question
I read a book
1
2
3
4
5
6
7
8
9
10
11
12
int main() {

Need help with basic sql
Hi,

I am using oracle 10g, and having some small doubts related to sql , here goes the si

'grab_files', multiple extension?
hey guys,

can anyone suggest a way to make to following line of code look for files with more

php libs/ browsercap.in
ok i have a host that refuses to stay current. they control my php settings and libs. is there a way

How to generate a text file using php...?
Hi,
Can anyone give me code to generate a text file using php


Thanks in advance

parse error
Parse error: syntax error, unexpected '[', expecting ')' in /Users/admin/Sites/phptest/array.php on

Problem writing URL into database
How would I write this into the database?

<?php echo "http://".$_SERVER['SER

How to kill asynchronous postback / current postback?
Hi,here is my problem:I have a web site with many pages of which some may take time to process resul

Retail terminologys not been altered after activing Retail System
Hi, All

After I active Retail System via TCode SWF5, the terms does not been changed, th

Security Exception on pages using AJAX
I am getting the exception: attempted to perform an operation not allowed by the security policy on

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