# |
Sep 12th 2009, 10:10 |
Dimatter |
ah! |
# |
Sep 12th 2009, 10:10 |
savant |
Dimatter: no, you were adding to a temporary value that was lost when it left the foreach scope |
# |
Sep 12th 2009, 10:10 |
Dimatter |
savant: thank you so much :) |
# |
Sep 12th 2009, 10:10 |
Dimatter |
well no wonder it failed :) |
# |
Sep 12th 2009, 10:09 |
Dimatter |
savant: so i basically was adding something to the "key" not to the "value" ? |
# |
Sep 12th 2009, 10:09 |
savant |
if you only do $key, then it's the same as only doing $value |
# |
Sep 12th 2009, 10:09 |
savant |
Dimatter: the $key is the, well, key in an array, whereas the $value is what it holds |
# |
Sep 12th 2009, 10:09 |
savant |
Dimatter: and then the two places where I actually set the new_count |
# |
Sep 12th 2009, 10:09 |
Dimatter |
savant: i never knew the diff between as $key => $value or as $key only |
# |
Sep 12th 2009, 10:08 |
savant |
Dimatter: see the first foreach() loop |
# |
Sep 12th 2009, 10:08 |
Dimatter |
savant: perfect. thank you ! i guess i need to check out the php's manual to figure out what u did |
# |
Sep 12th 2009, 10:07 |
Spirit |
lol, nope |
# |
Sep 12th 2009, 10:07 |
savant |
Spirit: that was to Dimatter, sorry |
# |
Sep 12th 2009, 10:07 |
Spirit |
where? |
# |
Sep 12th 2009, 10:06 |
savant |
try that |
# |
Sep 12th 2009, 10:06 |
savant |
http://pastie.org/614657 |
# |
Sep 12th 2009, 10:05 |
Dimatter |
savant: eh ..say what ? :) |
# |
Sep 12th 2009, 10:05 |
savant |
Dimatter: heh. you aren't passing by reference in the foreach, only by value :P |
# |
Sep 12th 2009, 10:05 |
Spirit |
the default .htaccess |
# |
Sep 12th 2009, 10:05 |
Spirit |
umm, yes, i have |
# |
Sep 12th 2009, 10:04 |
Dimatter |
savant: $categories |
# |
Sep 12th 2009, 10:04 |
Dimatter |
savant: http://pastie.org/614656 this is how i want it |
# |
Sep 12th 2009, 10:04 |
Dimatter |
Spirit: do you have the .htaccess file in the root of your application ? |
# |
Sep 12th 2009, 10:04 |
Spirit |
but i'm not found AddModule mod_rewrite.c |
# |
Sep 12th 2009, 10:04 |
Spirit |
i found LoadModule rewrite_module libexec/httpd/mod_rewrite.so |
# |
Sep 12th 2009, 10:04 |
Spirit |
win xp |
# |
Sep 12th 2009, 10:04 |
Spirit |
in httpd.conf |
# |
Sep 12th 2009, 10:03 |
savant |
operating system? |
# |
Sep 12th 2009, 10:03 |
Spirit |
i'm not sure |
# |
Sep 12th 2009, 10:03 |
savant |
Spirit: do you have mod_rewrite correctly enabled? What operating system are you running? |
# |
Sep 12th 2009, 10:03 |
Spirit |
cake is the directory where cake is installed |
# |
Sep 12th 2009, 10:03 |
Spirit |
i have other site inside my server |
# |
Sep 12th 2009, 10:03 |
Dimatter |
Spirit: try without |
# |
Sep 12th 2009, 10:02 |
savant |
Dimatter: I have no idea as to how you want to have the array |
# |
Sep 12th 2009, 10:02 |
Dimatter |
Spirit: u dont need /cake/ |
# |
Sep 12th 2009, 10:02 |
Spirit |
The requested URL /cake/posts/index was not found on this server. |
# |
Sep 12th 2009, 10:02 |
Spirit |
the browser tell me: Not Found |
# |
Sep 12th 2009, 10:02 |
Dimatter |
savant: check out the last paste. first u see the debugs (and everything is correct) but later u see the output of the whole $catgories array and the "new_count" is not there |
# |
Sep 12th 2009, 10:02 |
Spirit |
when i go to http://localhost/cake/posts/index |
# |
Sep 12th 2009, 10:01 |
Spirit |
ok :) |
# |
Sep 12th 2009, 10:01 |
savant |
Spirit: ask your question and someone can try :) |