|
|||||||
| PHP Discussion and technical support for using and deploying PHP based websites. |
![]() |
|
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
||||
|
||||
|
Script is more processor intensive than expected, why?
Hello,
I was writing a script to calculate the answers to the popular sudoku games... my script initializes by making an array with 81 values. In each slot I'm storing the X coordinate, Y coordinate, Q uadrant, and the possible values (1-9) Its a pretty straightforward script, and I tried commenting it as much as possible. However when I run it, It will echo this: Quote:
)PHP Code:
Its supposed to result in a script as follows: HTML Code:
Array
(
[1] => Array
(
[0] => X1
[1] => Y1
[2] => Q1
[3] => Array
(
[0] => 1
[1] => 2
[2] => 3
[3] => 4
[4] => 5
[5] => 6
[6] => 7
[7] => 8
[8] => 9
)
)
[2] => Array
(
[0] => X1
[1] => Y2
[2] => Q1
[3] => Array
(
[0] => 1
[1] => 2
[2] => 3
[3] => 4
[4] => 5
[5] => 6
[6] => 7
[7] => 8
[8] => 9
)
)
.....
[81] => Array
(
[0] => X9
[1] => Y9
[2] => Q9
[3] => Array
(
[0] => 1
[1] => 2
[2] => 3
[3] => 4
[4] => 5
[5] => 6
[6] => 7
[7] => 8
[8] => 9
)
)
)
__________________
<?php function reply_to_thread($user,$problem=NULL) { if($user["nice"] === TRUE) { give_possible_solution($problem);} else { exec($user,'code_fail',undefined); } return TRUE; } ?> |
|
#2
|
||||
|
||||
|
Never Mind.
Problem solved with ob_start(); Topic may be closed or whatever the mods prefer.
__________________
<?php function reply_to_thread($user,$problem=NULL) { if($user["nice"] === TRUE) { give_possible_solution($problem);} else { exec($user,'code_fail',undefined); } return TRUE; } ?> |
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|