|
-
May 26th, 2013, 05:25 AM
#1
Thread Starter
Hyperactive Member
Returning specific information with ->ID, ->Account, ->Mail, ->Skype etc...
(With one main function like User(), but without user class)
I don't really have idea what is smart way to create bunch of information picked up with the "arrow" I actually know what are they, but I don't know how to explain or what ever it is that I can search it from google.
But I want it to be like this:
function User($Name) {
// Other shiiieeeeet
}
Example results:
<?php $User($_SESSION['account'])->ID; ?>
<?php $User($_SESSION['account'])->Account; ?>
<?php $User($_SESSION['account'])->Mail; ?>
<?php $User($_SESSION['account'])->Skype; ?>
I can use such a feature for logged in users as I can use it for profiles like this.
<?php $User($_GET['profile'])->ID; ?>
<?php $User($_GET['profile'])->Account; ?>
etc...
But I don't have a clue how do I create "inner function" / "nested function" or whatever that I can use it with arrow. I've seen such a thing before, but it doesn't really help me just now. If I create functions inside of function I cannot use them with arrow.
Any ideas? Thanks!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|