phpBB2.de Forum Index  
[netclusive - internet broadcasting]
 FAQ  •  Search  •  Download  •  Bookmarks  •  Memberlist  •  Usergroups   •  Register  •  Profile  •  Log in to check your private messages  •  Log in
 
        
 
        
 

LinkLift

View next topic
View previous topic

This forum is locked: you cannot post, reply to, or edit topics.This topic is locked: you cannot edit posts or make replies.
Author Message
yester
phpBB2.de User
phpBB2.de User



Joined: 31 Oct 2002
Posts: 4

PostPosted: Thu 31 Oct, 2002 00:42 Reply with quoteBack to top 

Hi,
also ich weiß ich bin nicht der schlaue darum hier meine frage.

Ich möchte in PHP mehrdimisoniale arey benutzen!
Ich komme aus dem bereich Basic, und bin am verzweifeln.

also in Basic eine Zeile die ich in PHP brauche:

wert= Tabele(x,y)

eigendlich recht einfach doch ich finde keine info wie das in PHP funzt.

na ich denke ihr könnt helfen!
OfflineView user's profileSend private message
Google







Posted: Back to top

TerraTux
Support Team Member
Support Team Member



Joined: 02 Aug 2002
Posts: 1026
Location: Delitzsch

PostPosted: Mon 04 Nov, 2002 01:58 Reply with quoteBack to top 

wie wär es mit:

Quote:

<?
$wert = array('23', '40', '80'); // beliebig erweiterbar

$x = $wert[0]; // 23
$y = $wert[1]; // 40
$z = $wert[2]; // 80
?>


als kleines Beispiel
PHP lehnt sehr stark an C an, vieles is sicher auch auf Basic replizierbar..

Gruß,
Anti M&M

_________________
software is like sex, it's better if it's free
Image
Kein Support per PM || EMail || Messenger
OfflineView user's profileSend private messageVisit poster's websiteICQ Number
yester
phpBB2.de User
phpBB2.de User



Joined: 31 Oct 2002
Posts: 4

PostPosted: Tue 05 Nov, 2002 12:28 Reply with quoteBack to top 

sorry aber das wäre dann eindimisional!

zur zeit mach ich das so
// init
$lab[1]="00000000100001";
$lab[2]="00111111100001";
$lab[3]="00000000100001";
// zeichen finden!
$y=lab[$ystelle];

$gesucht=substr($y,$xstelle,1);

ich glaube das das so ziemlich jeder verstehen kann.

würde aber gerne das ganze in etwa so haben wollen!
$gesucht=laby[$xstelle,$ystelle];

Mal sehen ob da einer le lösung für mich hat, wäre ja schlimm wenn ich in die ausmasse 1000*1000 komme dann immer ein 1000er String benutzen , wäre ja riesig im speicher !

hoffe auf hilfe!
OfflineView user's profileSend private message
Novan
phpBB2.de User
phpBB2.de User



Joined: 10 Aug 2002
Posts: 112
Location: Münster

PostPosted: Sun 17 Nov, 2002 03:06 Reply with quoteBack to top 

Numerische Array:
$huhu[0][0] = "Feld 0,0";
$huhu[0][1] = "Feld 0,1";

Assoziative Arrays
$huhu[0][name] = "0,name";
$huhu[0][ort] = "0,ort";
$huhu[500][lieblingsessen] = "500,lieblingsessen";

Bei der 2. Version ist für die 2. Ziffer eine ein Alias Name gesetzt.
Eintragen kannste es wie folgt dann :
Code:

$huhu = array (
                      array (name => "Rene Espenhahn",
                                ort => "Buxtehude",
                                lieblingsessen => "doppelte Portion Gyros Pommes Zwiebel aber ohne .....),

array (................),
array (................)
);


Du sagst also ARRAY ( und dannach für jeden eintrag ein weiteres ARRAY mit dem inhalt. Also erstes Array steht dafür das die Variable eine Array is und das zweite Array is dann jeweils für jeden datensatz.

Auslesen geht dann mit ne verschachtelten FOREACH schleife.
weitere Infos findeste zu diesen Themen unter
http://www.dynamicwebpages.de
Rechts am Rand ist so eine Formularbox wo de einfach mal Array eingibst Wink
OfflineView user's profileSend private messageSend e-mailVisit poster's website
Display posts from previous:      
This forum is locked: you cannot post, reply to, or edit topics.This topic is locked: you cannot edit posts or make replies.

View next topic
View previous topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum

Similar Topics
Topic Author Forum Replies Posted
Member, part, problem, DonvanVliet Support Forum 1 Wed 02 Sep, 2009 20:46 View latest post
Seltsames Login Problem dr.feelgood Support allgemein 1 Sun 29 Mar, 2009 16:53 View latest post
Problem mit Admin Voting 1.1.8 xtc.sanchez phpBB2.x - MOD Support 0 Mon 16 Mar, 2009 20:39 View latest post
Problem mit Bedankomat 0.2.2 HILFE!!!! dmbo phpBB2.x - MOD Support 1 Sun 01 Mar, 2009 16:50 View latest post
Problem mit Rules Management Mod Dragonstorm phpBB2.x - MOD Support 0 Sat 07 Feb, 2009 22:18 View latest post