Re: Introduction and questions...

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Jason Pruim wrote:
> Hi Everyone, I'm very new to php and to this list. I'm hoping to be able
> to suck up as much knowledge from this list as I possibly can and be
> able to help and contribute in the future.
> 
> But until that time, I'm in need of some help.
> 
> I'm trying to write an image gallery script(Or program/application?) for
> displaying images on a web page. That part of it is working just fine,
> what I want to add though is the ability for people who use this script
> to be able to copy/paste a link to insert the HTML into their page/weblog.
> 
> In other words... How do I get it to display the text: <img
> src="myserver.com/path/to/picture" height="reasonable size"> instead of
> actually displaying the picture? 

htmlentities() is the beast you want, something like:

$imgHTML = '<img src="myserver.com/path/to/pic.jpg" height="200px" />';
echo htmlentities($imgHTML, ENT_QUOTES);

see here for more details:

	http://php.net/htmlentities

...

> 
> Anyway... Long enough post for my question I think, if you need more
> info let me know, and thanks in advance for any help even if it's just a
> RTFM... Just please include TFM ;)
> 

we generally wait until the third post before throwing manuals at you. :-)

...

> "We hold these truths to be self-evident. That all men are created
> equal, that they are endowed by their creator with certain unalienable
> rights, (and) that among these are Life, Liberty, and the pursuit of
> Happiness."

<desire to make political comment regarding bush administration repressed />

> 
> 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux