Yes - __FUNCTION__ would hold ( string )[function name]
Peter Beckman [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
Is there some sort of master variable which will tell you which function
you are currently in?
Like __FUNCTION__ like there is for __FILE__ and __LINE__... Something
Thank you all!
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Hi! This shouid be good:
?php
function getdomainname($name)
{
if(substr($name,0,4)=='www.') $name = substr($name,4,(strlen($name)-4));
return substr($name,0,strrpos($name,.));
}
echo getdomainname('www.nyloncoffee.interpc.pl');
?
short, nice and it's work good :)
- Original Message -
In article [EMAIL PROTECTED], [EMAIL PROTECTED]
wrote:
are INSERT INTO statements forbiden inside a function??
Assuming that you're referring to a PHP function and not a function of the
RDBMS, no it's not forbidden. Show the relevant snip of code and any error
messages being reported.
SOLVED
Wrong varable!
Is that as bad as spelling errors?
Dave
| In article [EMAIL PROTECTED], [EMAIL PROTECTED]
| wrote:
|
| are INSERT INTO statements forbiden inside a function??
|
| Assuming that you're referring to a PHP function and not a function of the
| RDBMS, no it's not