logs archiveIRC Archive / Freenode / #php / 2006 / February / 22 / 1
CAiRO
hi
nmatrix9
ok this java book is pissing me off
Wizz_kidd11
hmmmmm
java = :(
nmatrix9
about half the examples in the freaking book don't work
wtf kinda expert is that???
MikeH
does php5 need mysql4, or will it work ok with mysql3?
CAiRO
what could be the cause if session files don't get cleaned up from /tmp? i'm just deleting 800000 sess_* files
nmatrix9
don't editors check books nowadays?
Wizz_kidd11
why would you want 3 ?
nmatrix9
or does that only apply to the New York Times?
         

MikeH
because I don't want to upgrade my mysql installation
Wizz_kidd11
nmatrix9: im sure they work lol
valqk
hello all! anyone that has used xajax?
_ac_chan_
nevermind
Wizz_kidd11
Yep
MikeH
I have around 20 databases on it, all in use Wizz_kidd11
Wizz_kidd11
you can upgrade and still keep the DB's
nmatrix9
Wizz_kidd11: no they don't at least not on this box I went to the site just in case there was a errata
thought I missed something
so I dl the files from the site itself
MikeH
Wizz_kidd11: I don't want to risk loosing them, can you answer my question?
nmatrix9
compiled
then ran it
Wizz_kidd11
heh Wizz_kidd11 find it hard to belive that a book would be that bad
insin
(Action) was io HELL for a week when his host installed MySQL3 instead of 4 by mistake
nmatrix9
and got the same errors
gary__
I am passing the name of an array to a function: e.g function_call(array_name) and I want to use the array name to call it's values, e.g. in the function: $array[0][1]; remember $array contains the NAMe of the array I wish to call. Any ideas about how to call it properly, as it doesn't seem to work for me;
echo $array[0][1];
Wizz_kidd11
an e book nmatrix9 ')
nmatrix9
no library book
Jymmm
circa 1942
mattmcc
garry__: Erm, the name in what scope?
gary__: And why wouldn't you just pass the array?
Wizz_kidd11
gary_: seems a sloppy way of doing it
gary__
mattmcc: the array is defined in the include file where the function is located
         

gary_
so the idea is that you have all the arrays defined in the include file, then from wherever you are, you can just call the function and pass the array name so it knows what to use
a dynamic function for all purposes
valqk
gary_: make it like this in the funct
mattmcc
Okay, but why not just pass the array itself?
valqk
for($i=0;$i<sizeof($arr);$i++) { $arr[$i][$m][$s][$o][$p]='goo barry!'; }
TML
Right. Instead of foo('bar'), why not foo($bar)?
valqk
where i,m,s,o,p are loop counters
mattmcc
(Action) blinks.
valqk
mattmcc offered the righter way to do it - pass it as refference
AcidReign
valqk: you realize, you are insane, right?
valqk
AcidReign: definately! :) ROLF :)
AcidReign
valqk: "righter" ?
valqk
AcidReign: the better
cavediver
Hi. Anyone running Zend studio on Linux ?
valqk
english is not my native
metalhedd_
is there a way to read the http headers that are send when you open a url with fopen or file_get_contents ?
cavediver: I am
valqk
AcidReign: I did this few times and it worked just fine and 1000xtimes faster than 10 selects in sql ;-)
welll in table with 20 000 000 lines :)
cavediver
metalhedd_: I'm having trouble getting it to work. Install went fine but when I start it no menus appear. Just a empty grey screen. However the initial tips-screen is displayed ok. Do you recognize this problem ?
valqk
AcidReign: you have no idea how faster php can be than sql :)
so... anyone that can help me with xajas + smarty+ob_start+UTF8 problem?
metalhedd_
cavediver: no sorry, it worked great for me.
gary_
valqk: well it's basically what I was doing anyway, except I was using a while loop
still have the same problem
cavediver
metalhedd_: ok.
gary_
just to re-cap
I have an array. e.g.: food = array ( array("apples", "green"), array("oranges", "orange") );
don't ask why it's like this :D
valqk
AcidReign: ah yeah! I've used the same methon in convertChars or something like this named class from phpclasses - I've optimized it and now it works about 20 time faster for me
gary_
now I have a function that reads the array and outputs it's data
TML
gary_: You mean $food, not food, right?
gary_
but I want to be able to just say: read the array that is named in $variable. so it is dynamic, not just for one thing
yes
valqk
gary: when u deal with array with [][][][][][][] elements _DO NOT_ use while! NEVER! :)
gary_
that's right :
lig
Morning
gary_
point taken on board! :P
evening
valqk
I'm gettin' lost at fifth array :) but if i use while, welll... will never get it working ;-)
evening :)
welll... gary can you exaplin it a little bit more?
gary_
yes
valqk
what u wana do exaclty?
TML
!tell valqk about u
lagger^
is there any way to read the http header of an incoming connection?
mattmcc
gary_: I'm sticking with my original suggestion. Pass the array, rather than its name.
Wizz_kidd11
anyone here mess with php qt as of yet
gary_
well, i have a normal webpage, and I want to call a function to output some things. The function itself uses an array to output the items in question. This all worked fine when I was just calling the array statically by name
AcidReign
valqk: what did any of that have to do with a *5* dimensional array??!!
TML
lagger^: Take a gander at php.net/apache
valqk
AcidReign: well... stats on 5 criteria... don't ask! simply you don't wanna know ;-)
gary_
I want to go one stage further. Have the function read a variable passed to it, to find out what array it is supposed to read. So it goes like this: (Read array with the name located in the $variable). Rather than ("Read array $fruit")
MikeH
guys, is there a guide somewhere to upgrade from php4 to php5 on FC3?
lagger^
TML: thanks
Kog
TML: that serialize problem I told you about earlier (you may have already forgotten ;), I had to remove spurious slashes
TML: was failing because the s: counts were off
TML
Kog: Ah. You have magic_quotes_gpc on.
Kog
TML: that's on by default?
(4.4)
TML
Kog: I don't recall the default setting, but I assume so.
Kog
(Action) goes and reads phpinfo
valqk
gary: uhm hmhmmmmm
gary_
done it I think
Kog
magic_quotes_gpc On On
valqk
u should scan by key...
how?
TML
Kog: ta-daaa
!tell valqk about u
Kog
TML: I coulda sworn they turned that off in the 4/5
gary_
I did used {} to do it. So echo {$variable[0][0]}
sorry
i did
Kog
TML: oh well, better leave it on. osCommerce might throw a fit
Wizz_kidd11
PHP to assebly coming soon !!!!
gary_
I did used {} to do it. So echo ($this->{$variable}[0][0])
Kog
although... I now know what magic_quotes_gpc does
TML
valqk: I won't warn you again. The next one, you'll be removed.
Stormchaser
Kog: You shouldn't use oscommerce, anyways...
Kog
Stormchaser: what should we be using?
valqk
TML: k I'm outta here! that suz u know. damn! nighty!
Stormchaser
check out cpcommerce
AcidReign
(Action) raises an eyebrow at Wizz_kidd11
Kog
Wizz_kidd11: there are already assemblers/compilers for PHP
no one uses them because it's a stupid idea ;)
Wizz_kidd11
show me
Stormchaser
(Action) snickers
Kog
Wizz_kidd11: learn to use google
Stormx2
Hey. When I declare a function, how do I make a parameter optional?
Wizz_kidd11
show me
lol
Kog
find it yourself
Wizz_kidd11
dude
Kog
although, I've seen lexx/yacc for it
Wizz_kidd11
ummm.......
ds-
!tell ds- about u
Stormx2
when you guys have quite finished talking about php compilers ;)
Kog
Stormchaser: I wish I had seen that earlier...
ds-
lol
Kog
Stormchaser: we evaluated ~10 solutions
and somehow... we missed that one
Stormx2
pretty pretty please!! When I declare a function, how do I make a parameter optional?
Stormchaser
Kog: I know of no person, that would know everything :)
Kog
Stormchaser: yet, I think my google-fu is tolerably strong
Stormx2
so that when you call the function, you don't need to fill it in
enygma
(Action) talks
(Action) talks more
Kog
Stormx2: I u sually do function f($param, $param2 = "I hate goats")
ds-
;p
hydraling
lexx and yarc
mybadluck
yeah, default values
Stormchaser
(Action) blabbers back at enygma
Donkano
How do I parse a a part of an array as 2 variables?
enygma
(Action) blubbers
Stormchaser
:)
« prev 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 next »