The Dope Show (09.07.2014)
-
09.07.2014, 15:24 #1
PHP echo Kurzbefehl funktioniert nicht
Hi,
ich habe in der PHP Doku gesehen, dass man sich das umständliche
PHP-Code:<?php echo $foo; ?>
PHP-Code:<?=$foo?>
Mein Testcode:
PHP-Code:<?php
$text = "test";
?>
<input type="button" value="<?=$test?>" />
HTML-Code:<input type="button" value="<?=$addIconButtonText?>">
-
09.07.2014, 15:33 #2
- Registriert seit
- 15.11.2011
- Beiträge
- 6.145
- Blog Entries
- 5
Thanked 9.130 Times in 3.005 PostsAW: PHP echo Kurzbefehl funktioniert nicht
Welche PHP-Version nutzt du? Vor 5.4.0 funktioniert das nur wenn short_open_tag eingeschaltet ist, also
Code:short_open_tag = On
-
The Following User Says Thank You to DMW007 For This Useful Post:
-
09.07.2014, 17:03 #3
AW: PHP echo Kurzbefehl funktioniert nicht
Danke das wars
Ein Problem habe ich aber noch: Wenn es ein Array ist, funktioniert es trotzdem nicht.
PHP-Code:<?php
$text = array("startButton" => "Start");
?>
<input type="button" value="<?=$text["startButton"]?>" />
HTML-Code:<input type="button" value="Array" />
-
31.05.2015, 19:55 #4
- Registriert seit
- 24.04.2014
- Beiträge
- 105
Thanked 627 Times in 47 Posts
Ähnliche Themen
-
Funkmaus funktioniert nicht
Von Runix im Forum WindowsAntworten: 9Letzter Beitrag: 12.09.2013, 20:48 -
Headset funktioniert nicht
Von Manipulate im Forum HardwareAntworten: 3Letzter Beitrag: 01.08.2013, 14:53 -
[H] DayZ Mod funktioniert nicht...
Von ryudragon14 im Forum Sonstige GamesAntworten: 3Letzter Beitrag: 09.08.2012, 14:05 -
Schwimmtestprogramm funktioniert nicht !
Von AlexEHM im Forum C++Antworten: 1Letzter Beitrag: 12.06.2012, 22:28 -
Webcam funktioniert nicht
Von kollos im Forum HardwareAntworten: 8Letzter Beitrag: 20.03.2012, 18:57
Diese Seite nutzt Cookies, um das Nutzererlebnis zu verbessern. Klicken Sie hier, um das Cookie-Tracking zu deaktivieren.