Webmaster Forum

Sponsored Reviews   1,000 Directory Submissions   V7N Directory
Go Back   Webmaster Forum > Web Development > Web Design Lobby > Coding Forum
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Coding Forum Problems with your code? Let's hear about it.

Reply
 
LinkBack Thread Tools Display Modes
Old 02-10-2005, 03:42 PM   #1 (permalink)
Possible Terrorist
 
kwvarga's Avatar
 
Join Date: 10-13-03
Location: Tuscaloosa, AL or Atlanta
Posts: 4,904
iTrader: 0 / 0%
Latest Blog:
A+ Certification

kwvarga is a highly respected web prokwvarga is a highly respected web prokwvarga is a highly respected web prokwvarga is a highly respected web prokwvarga is a highly respected web prokwvarga is a highly respected web prokwvarga is a highly respected web prokwvarga is a highly respected web prokwvarga is a highly respected web prokwvarga is a highly respected web prokwvarga is a highly respected web pro
Send a message via AIM to kwvarga
Recursive problem

Code:
function reSearch($board, $searchValue, $row, $col) { // find left if ($row > 0) { $row1 = $row - 1; if ($board[$row1][$col] == $searchValue) { $board[$row1][$col] == "*"; $board = reSearch($board, $searchValue, $row1, $col); } } // find right if ($row < 9) { $row1 = $row + 1; if ($board[$row1][$col] == $searchValue) { $board[$row1][$col] == "*"; $board = reSearch($board, $searchValue, $row1, $col); } } // find up if ($col > 0) { $col1 = $col - 1; if ($board[$row][$col1] == $searchValue) { $board[$row][$col1] == "*"; $board = reSearch($board, $searchValue, $row, $col1); } } // find down if ($col < 9) { $col1 = $col + 1; if ($board[$row][$col1] == $searchValue) { $board[$row][$col1] == "*"; $board = reSearch($board, $searchValue, $row, $col1); } } return $board; }
sent a position where nothing is next to it in any direction it works,
but when there are any next to the block (making it run the IF statements.. and thus run through it recursively.. it crashes the site..

any text before the call isnt even outputted.. any ideas?
__________________
Kyle Varga
"m3lt/theSpear"
student, web designer/coder, future IT consultant
Experience: PHP/MySQL, Java, C++, MS-SQL

Last edited by kwvarga : 02-10-2005 at 03:45 PM.
kwvarga is offline  
Add Post to del.icio.us
Reply With Quote
Sponsored Links
SEO Hosting by HostGator  Advertise Here  Buy Blog Links
Old 02-10-2005, 06:49 PM   #2 (permalink)
Possible Terrorist
 
kwvarga's Avatar
 
Join Date: 10-13-03
Location: Tuscaloosa, AL or Atlanta
Posts: 4,904
iTrader: 0 / 0%
Latest Blog:
A+ Certification

kwvarga is a highly respected web prokwvarga is a highly respected web prokwvarga is a highly respected web prokwvarga is a highly respected web prokwvarga is a highly respected web prokwvarga is a highly respected web prokwvarga is a highly respected web prokwvarga is a highly respected web prokwvarga is a highly respected web prokwvarga is a highly respected web prokwvarga is a highly respected web pro
Send a message via AIM to kwvarga
got it.. == instead of =
man..

!!!!!!!!!!!!!!!!new question!!!!!!!


with a 2 dimmension php array, i want to take out [9][4] then [8][4] falls to [9][4] and the value -1 is added to [0][4]. any ideas?
__________________
Kyle Varga
"m3lt/theSpear"
student, web designer/coder, future IT consultant
Experience: PHP/MySQL, Java, C++, MS-SQL
kwvarga is offline  
Add Post to del.icio.us
Reply With Quote
Old 02-10-2005, 06:55 PM   #3 (permalink)
v7n Mentor
 
jg_v7n's Avatar
 
Join Date: 08-26-04
Location: Rio de Janeiro
Posts: 1,289
iTrader: 0 / 0%
Latest Blog:
None

jg_v7n is a highly respected web projg_v7n is a highly respected web projg_v7n is a highly respected web projg_v7n is a highly respected web projg_v7n is a highly respected web projg_v7n is a highly respected web projg_v7n is a highly respected web projg_v7n is a highly respected web projg_v7n is a highly respected web projg_v7n is a highly respected web projg_v7n is a highly respected web pro
Not sure quite what you mean but take a look at: array_shift() & array_push()
__________________
Web Directory - SMS Dictionary
jg_v7n is offline  
Add Post to del.icio.us
Reply With Quote
Go Back   Webmaster Forum > Web Development > Web Design Lobby > Coding Forum

Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Google's China Problem (and China's Google Problem) - NYTimes Sunday Mag (4/23/06) Julie Google Forum 3 09-18-2007 01:00 AM
Problem with godaddy. Post your problem here!! charlesgan Web Hosting Forum 7 05-09-2007 09:36 AM
SQL problem kakarotto Coding Forum 6 01-24-2005 08:20 PM
SOAPXML Recursive function gaurav Coding Forum 5 01-07-2004 07:44 PM


Sponsor Links
Get exposure! Get exposure! Find Scripts Web Hosting Directory Get exposure! SEO Blog


All times are GMT -7. The time now is 04:41 AM.
© Copyright 2008 V7 Inc