Welcome to dbForumz.com!
FAQFAQ    SearchSearch      ProfileProfile    Private MessagesPrivate Messages   Log inLog in

Function Problem

 
   Database Forums (Home) -> PHP RSS
Next:  SQL parsing  
Author Message
Mojo

External


Since: May 20, 2008
Posts: 1



(Msg. 1) Posted: Tue May 20, 2008 12:35 pm
Post subject: Function Problem
Archived from groups: comp>lang>php (more info?)

Hi,

ShowPicture function below doesn't produce any code.
Any help?

Thanks..

Mojo

------------------------------------------------------------------------


$xmlFileData = file_get_contents('somefile.xml');
$xmlData = new SimpleXMLElement($xmlFileData);


function showpicture($x) {
print ($xmlData->product[$x]->image);
}


showpicture(1);

 >> Stay informed about: Function Problem 
Back to top
Login to vote
Michael Fesser

External


Since: Mar 01, 2006
Posts: 314



(Msg. 2) Posted: Tue May 20, 2008 9:52 pm
Post subject: Re: Function Problem [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

..oO(Mojo)

>ShowPicture function below doesn't produce any code.
>Any help?
>
>Thanks..
>
>Mojo
>
>------------------------------------------------------------------------
>
>
>$xmlFileData = file_get_contents('somefile.xml');
>$xmlData = new SimpleXMLElement($xmlFileData);
>
>
>function showpicture($x) {
> print ($xmlData->product[$x]->image);
>}
>
>
>showpicture(1);

First fix your setting of error_reporting in your php.ini. It should
be E_ALL|E_STRICT on a development machine. Make sure display_errors
is enabled as well. Then PHP will at least show you a notice. If that
doesn't help, read about global variables and variable scope.

Micha

 >> Stay informed about: Function Problem 
Back to top
Login to vote
Display posts from previous:   
Related Topics:
Problem with Mail() Function - The following simple script receives data from a form and sends me an email. It works fine on my testing machine (xampp for windows). However, when I upload it to my web host, the script processes but I do not receive the email. I have used two..

How to pass a function to a function?, and how to pass the.. - I'd like to write a function like: function f(){ ... bla ...} f_example(f); function f_example($function_to_execute) {...bla... $function_to_execute() ...bla....} AND how to pass the variable of the function : function..

Image function? - Hi all, Im using PHP 4.4.2 on Windows with apache. Can anyone tell how to use funtions to create and manipulate GIF and JPEG images? Is this functionallity available in PHP and do i need to change setting or do i need to install aditional dll (where can...

String Contains Function - Is there a function in PHP that will return a boolean if a String contains another given String. As what I am trying to do is disallow input that contains ../ or something else that would allow directory traversal. j1mb0jay

Using the mail() function - I'd like to use the $headers field in the mail() function of PHP, but I'd like to be able to make these variable that somebody could change in a form. $headers .= 'To: $to' . "\r\n"; Something like that above. Thanks, --TJ
   Database Forums (Home) -> PHP All times are: Pacific Time (US & Canada)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum



[ Contact us | Terms of Service/Privacy Policy ]