Search found 6 matches

by RickyT23
Sat Mar 24, 2012 11:35 am
Forum: PHP coding => General
Topic: array_search is proving difficult on a complex array
Replies: 2
Views: 1915

Re: array_search is proving difficult on a complex array

OK, I have managed to get rid of the extra level of array with the following statement:

Code: Select all

$b=$a['Rrestaurant']; 
I think I will be able to do it now :)

Silly, huh?
by RickyT23
Fri Mar 23, 2012 11:37 pm
Forum: PHP coding => General
Topic: array_search is proving difficult on a complex array
Replies: 2
Views: 1915

Re: array_search is proving difficult on a complex array

bump?! What Am I doing wrong. In sure that the problem is because the array has an extra parent container, - is there any way I can get rid of that container? Or a way of simpliflying the array but still being able to get the index of positive restaurants?
by RickyT23
Thu Mar 22, 2012 3:58 pm
Forum: PHP coding => General
Topic: array_search is proving difficult on a complex array
Replies: 2
Views: 1915

array_search is proving difficult on a complex array

I have been set a college assignment for which I am building a faux directory of restaurants, using XML to store my directory. The XML file looks as follows: <?xml version="1.0"?> <cumbrianRD> <Rrestaurant> <Rname>Steve's Steak House</Rname> <Raddress>Carlisle, Cumbria</Raddress> <Rtel>05432 12345</...
by RickyT23
Thu Nov 03, 2011 6:36 pm
Forum: PHP coding => General
Topic: N00b using a while loop to print contents from an array
Replies: 5
Views: 1561

Re: N00b using a while loop to print contents from an array

Thanks for your help. I have had my little eureka moment, I found some very useful information here: http://www.informit.com/articles/article.aspx?p=31840&seqNum=4 This information seems very old, I worry about any problems which might occur. Either way, when I run this horrid little uncommented tes...
by RickyT23
Thu Nov 03, 2011 7:00 am
Forum: PHP coding => General
Topic: N00b using a while loop to print contents from an array
Replies: 5
Views: 1561

Re: N00b using a while loop to print contents from an array

Thanks very much for you help there, so among other things, I need the content of the primary array to be an index, rather than the title. I had assumed that I could call the array using an index, even though the arrays had actual titles.

(general musing and scurrying sounds) :D
by RickyT23
Wed Nov 02, 2011 8:59 am
Forum: PHP coding => General
Topic: N00b using a while loop to print contents from an array
Replies: 5
Views: 1561

N00b using a while loop to print contents from an array

Hi all I have recently started the undergraduates course for computer science, and for part of my 'Web Apps' module I am required to make a website with a simulated database (PHP with no SQL). Stupid, right? Anyway, I am pretty much new to PHP, but I am trying to experiment and learn so that I can a...