The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.
|
 |
|
Dev Shed Forums
> Programming Languages
> PHP Development
|
Page 2 -
Joomla - Php alt tag in images dont work
Page 2 - Discuss Php alt tag in images dont work in the PHP Development forum on Dev Shed. Php alt tag in images dont work PHP Development forum discussing coding practices, tips on PHP, and other PHP-related topics. PHP is an open source scripting language that has taken the web development industry by storm.
|
|
 |
|
|
|
|
|

Dev Shed Forums Sponsor:
|
|
|

February 28th, 2013, 07:33 AM
|
 |
pollyanna
|
|
Join Date: Jul 2012
Location: Germany
|
|
I don't think that praying will help.
If you already have enough of the problem, simply leave the alt tag empty. Otherwise keep testing.
I basically see two possibilities: Either there are some really, really weird dependencies, which somehow shuffle the attributes before the output. Or you're making some really, really stupid mistake. I'm not saying that you do, but we had several occasions when people made weird typos or used different code than what they posted here.
In any case, PHP does not care about the HTML context. The parser simply evaluates everything between "<?php" and "?>", it does not "know" whether the output goes into an alt tag or an element or whatever.
|

February 28th, 2013, 07:51 AM
|
|
Contributing User
|
|
Join Date: Oct 2012
Location: Croatia
Posts: 66
Time spent in forums: 9 h 58 m 54 sec
Reputation Power: 1
|
|
Yes, this is true, but haw can i make mistakes when i copy paste your code. And all work well wen are out of img tag, and inside give something wrong. Maybe because this is img tag, and then from database do not witdraw name of games, they witdraw name of images. But whay, i don have clue. And sure i em not so stupid to make somy typo, because i use copy paste. 
|

February 28th, 2013, 08:32 AM
|
 |
pollyanna
|
|
Join Date: Jul 2012
Location: Germany
|
|
|
Like I said, PHP knows nothing about the surrounding HTML. It does not "know" that it's inside an img, so it doesn't change its behaviour depending on the context. That would be rather weird, wouldn't it?
Anyway, if you don't wanna try out the suggestions, I'm out of ideas...
|

February 28th, 2013, 08:49 AM
|
|
Contributing User
|
|
Join Date: Oct 2012
Location: Croatia
Posts: 66
Time spent in forums: 9 h 58 m 54 sec
Reputation Power: 1
|
|
Quote: | Originally Posted by Jacques1 Like I said, PHP knows nothing about the surrounding HTML. It does not "know" that it's inside an img, so it doesn't change its behaviour depending on the context. That would be rather weird, wouldn't it?
Anyway, if you don't wanna try out the suggestions, I'm out of ideas... |
I tray your sugestion, but this work out from imgages. :S Not in images.
|
Developer Shed Advertisers and Affiliates
| Thread Tools |
Search this Thread |
|
|
|
| Display Modes |
Rate This Thread |
Linear Mode
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|
|