Register for your free account! | Forgot your password?

Go Back   elitepvpers > Coders Den > Web Development
You last visited: Today at 05:46

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



[PHP] Variable macht Probleme

Discussion on [PHP] Variable macht Probleme within the Web Development forum part of the Coders Den category.

Reply
 
Old   #1
 
Heberg's Avatar
 
elite*gold: 209
Join Date: Oct 2009
Posts: 947
Received Thanks: 210
[PHP] Variable macht Probleme

Hey !

Folgender Code :

PHP Code:
$filename "de1.l98";
                
$line file($filename);
                
$line array_map("rtrim"$line);
                
                if(
$line[96] == "URL="){
                echo 
"<option>Borussia Dortmund</option>";
                }
                if($
$line[104] == "URL="){
                echo 
"<option>FC Bayern Muenchen</option>";
                }
                if(
$line[112] == "URL="){
                echo 
"<option>Bayer 04 Leverkusen</option>";
                }elseif(
$line[120] == "URL="){
                echo 
"<option>Hannover 96</option>";
                }elseif(
$line[128] == "URL="){
                echo 
"<option>Werder Bremen</option>";
                }elseif(
$line[136] == "URL="){
                echo 
"<option>FC Schalke 04</option>";
                }elseif(
$line[144] == "URL="){
                echo 
"<option>VfL Wolfsburg</option>";
                }elseif(
$line[152] == "URL="){
                echo 
"<option>Hamburger SV</option>";
                }elseif(
$line[160] == "URL="){
                echo 
"<option>Borussia M'gladbach</option>";
                }elseif(
$line[168] == "URL="){
                echo 
"<option>1. FC Koeln</option>";
                }elseif(
$line[176] == "URL="){
                echo 
"<option>1899 Hoffenheim</option>";
                }elseif(
$line[184] == "URL="){
                echo 
"<option>VfB Stuttgart</option>";
                }else{
                echo 
"<option>Keine Vereine verfügbar !</option>";
                } 
Problem:
Diese Optionen werden nicht angezeigt.

Wenn ich z.B. $line[104] ausgebe mithilfe des "echo" befehles kommt "URL=" raus. Wenn ich statt $line[104] -> "URL=" hinschreibe, werden sie angezeigt. Meine frage wäre, warum er diese Variable nicht als "URL=" ansieht und somit das ganze anzeigt.
Heberg is offline  
Old 03/18/2012, 01:35   #2


 
Whoknowsit's Avatar
 
elite*gold: 146
Join Date: May 2009
Posts: 3,764
Received Thanks: 6,973
Was ergibt var_dump($line)?
Whoknowsit is offline  
Old 03/18/2012, 01:36   #3
 
Heberg's Avatar
 
elite*gold: 209
Join Date: Oct 2009
Posts: 947
Received Thanks: 210
Wie meinst
EDIT: Danke, Problem gelöst !
Heberg is offline  
Reply


Similar Threads Similar Threads
Xampp macht probleme
05/01/2012 - Metin2 Private Server - 3 Replies
Also ich habe einen eigenen Server alles fertisch nur noch Homepage ja also: Habe Xampp zum erstellen der Homepage alles ging gut nur ein Fehler und ich wollte erstmal ales Deinstallieren und neu installieren damit alles Sauber ist. Nur Xampp lässt sich nicht ganz entfernen. es entfernt alles auser die Myqsl Dienste und so wie kriege ich die jetzt auch weg ?
Cost of accessing a casted variable vs. assigning the casted variable? (C#)
01/05/2011 - CO2 Programming - 5 Replies
I know that in unmanaged C++, casting is at compile-time, so it's better to avoid the assignment and simply access it for all instances. However, in C#, I have no idea since I'm pretty new to it.
Nardawasil??? Bug ?? macht Probleme
12/24/2010 - 4Story - 4 Replies
hi ich wollte in 4story EG in die nardawasil schlacht rein ( denke das heißt narwashi) seit dem komm ich nicht mehr is das ein bug... -.- wenn ich mich einloggen will mit dem char kommt entweder oder nur . kann mir da jmd die lösung des problems nennen bitte:cool:
Überprüfen ob Variable Eine Variable ist
10/16/2010 - AutoIt - 26 Replies
Hey leute ich wollte fragen ob/wie man überprüfen kann ob eine Variable eine Variable ist z.b. so $k = 1 $i = $k if $i = VARIABLE Then msgbox(0,'$i ist eine variable!!','') endif PS:Wp releast man nochma TuT (z.b. für metin2??)
WoW macht Probleme ;(
01/11/2008 - World of Warcraft - 5 Replies
Guten Abend! Mein WoW macht mir seit einiger Zeit Probleme. Wenn ich entweder in der Chara- oder Serverauswahl oder in der Char-Erstellung bin, startet oft mein PC einfach neu. Hab mir schon Gedanken gemacht, woran das liegen könnte. Ich denke, RAM-Überlastung schließ ich aus. Hab momentan 1GB RAM drin und meistens "nur" WoW, Opera, AntiVir und ne AV an, WoW zieht ja ca. 200MB, Opera ca. 80 und insg. komm ich vll. auf 350 bis maximal 500 benutzten MB RAM. Eine zweite Erklärung wäre die...



All times are GMT +2. The time now is 05:46.


Powered by vBulletin®
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2024 elitepvpers All Rights Reserved.