This is a discussion on Newbie PHP Problem - not sure what to call this post within the PHP Language forums, part of the PHP Programming Forums category; Hello I was hoping you may be able to help me with a problem that I am having whilst customising ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
Hello I was hoping you may be able to help me with a problem that I am
having whilst customising a Voting Script. I have very basic knowledge of PHP, having only learnt it for a few months whilst at university. I thought I would have a go at editing a pre written script but am already coming up against hurdles. http://www.tastymota.com/lloydie/pol...=mingavote.cfg is the poll http://www.tastymota.com/lloydie/pollvote/mingavote.cfg is the file it takes its information from The problem I am having is with line 34 of the php code (I think): printf("<img src=\"%s\">",$imageurl["image"]); This line only takes the first letter of the filename of the image that I wish to display, which is less than handy. I figure I am on the right track given that I have got it to display one letter! (There is no image called fff.jpg but I will create one when I know the script will call it properly!) Many thanks in advance to anyone who can end my torture Lloydie the Tired Newbie ( 02:02 in the morning ) PS Any suggestions for a title for this problem, and therefore a better subject for this post are greatly appreciated!! --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.558 / Virus Database: 350 - Release Date: 02/01/2004 |
|
|||
|
Lloydie wrote:
> printf("<img src=\"%s\">",$imageurl["image"]); > > This line only takes the first letter of the filename of the image that I > wish to display, which is less than handy. I figure I am on the right track > given that I have got it to display one letter! I don't use printf myself, but having checked the API, your syntax seems correct for what you are trying to do. What output do you get if you add this line before your trouble line: echo "<p>TEST: array data == ".$imageurl["image"]."</p>"; If only one letter appears after the is-equal-to symbol, then the value stored in your $imageurl array only has one character, and you should suspect whatever code has built the array. -- Bob London, UK echo Mail fefsensmrrjyaheeoceoq\! | tr "jefroq\!" "@obe.uk" |