SunQuest
 
           General Programming Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 
Go Back   Dev Articles Community ForumsProgrammingGeneral Programming Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
Stay one step ahead of the competition. Evaluate and give feedback on some of the hottest web development tools on the market today. Make your opinion heard! Click Here
  #1  
Old November 1st, 2002, 07:09 AM
fakker fakker is offline
The calm b4 the storm
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jul 2002
Location: Manchester, UK
Posts: 404 fakker User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 7
Send a message via Yahoo to fakker
functions problem..

hey'all

I'm in a dilly of a pickle with this one!! Any help's much appreciated!

The screnario...

I have a page where I include my "functions.php" page. Functions.php contains all my... you guessed it.. functions..!!
one such eample would be:

PHP Code:
function do_rename($path,$filename)
{
get_vars();
//rename the file
echo $success;



now, $success is part of another function called "get_vars()". That looks like:

PHP Code:
function get_vars()
{
$success "<table>";
$success .= "<tr>";
//etc etc
$success .= "</table>";



now... why when I display the first function, do_rename, does it not display the contents of $success... cos I have called the function (get_vars) so I thought that would work!

Any ideas??!!

Cheers!
__________________
Matt 'Fakker' Facer

mattfacer.com

Reply With Quote
  #2  
Old November 1st, 2002, 08:21 AM
Lindset Lindset is offline
weirdomoderator
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jun 2002
Location: Alta, Norway
Posts: 370 Lindset User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 7
Send a message via ICQ to Lindset Send a message via AIM to Lindset
Like this?

PHP Code:
<?php

function do_something() {
    
$var get_something();
    
    return 
$var;
}

function 
get_something() {
    
$variable "<table>";
    
$variable .= "<tr>";
    
$variable.= "</table>";
    
    return 
$variable;
}


echo 
rename_file();

?>


__________________
Best Regards,
Håvard Lindset

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsProgrammingGeneral Programming Help > functions problem..


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 4 hosted by Hostway