Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

Reply
 
Thread Tools Display Modes
Old Jun 3rd, 2008, 10:39 AM   #1
theguy0000
Programmer
 
Join Date: Jul 2005
Posts: 73
Rep Power: 4 theguy0000 is on a distinguished road
Quickly display variables

hey, I haven't posted here in awhile, but I need some quick help.

Isn't there a way in php to quickly echo variables?

Like, you could say

<?php echo($var) ?>

But isn't there a shortcut to that? I tried google but I couldn't come up with good search terms since I don't know the name for this.
theguy0000 is offline   Reply With Quote
Old Jun 3rd, 2008, 12:00 PM   #2
grimpirate
King of Portal
 
grimpirate's Avatar
 
Join Date: Sep 2005
Posts: 420
Rep Power: 4 grimpirate is on a distinguished road
Send a message via Yahoo to grimpirate
Re: Quickly display variables

Doesn't get any quicker than echo for each individual variable. However if you were using an array you could use print_r which would print them all out sequentially. Also there's the var_dump function.
__________________
Lo, there do I see my father. 'Lo, there do I see My mother, and my sisters, and my brothers. 'Lo, there do I see The line of my people... Back to the beginning. 'Lo, they do call to me. They bid me take my place among them. In the halls of Valhalla... Where the brave... May live... ...forever.. GrimBB | Mimesis
grimpirate is offline   Reply With Quote
Old Jun 3rd, 2008, 12:03 PM   #3
theguy0000
Programmer
 
Join Date: Jul 2005
Posts: 73
Rep Power: 4 theguy0000 is on a distinguished road
Re: Quickly display variables

I definitely remember a simpler way, and I think that it's not enabled on all php configurations, like an install argument. It may be turned off by default.

<?php:$var?>
or something like that.

edit: could it be
<?=$var?>
theguy0000 is offline   Reply With Quote
Reply

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
CGI Script - change product display jess Perl 3 Jul 12th, 2006 5:25 PM
Language display in program Prm753 C++ 3 May 30th, 2006 5:45 PM
How to display a System Menu ? Bazukaz C++ 0 Sep 29th, 2005 5:07 PM
Variables coldDeath Python 4 Aug 9th, 2005 11:35 AM
global variables uman C++ 2 Feb 20th, 2005 10:39 PM




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 4:18 AM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC