logs archiveIRC Archive / Freenode / #php / 2006 / February / 11 / 1
LLX
not if he uses a flux capacitor Poll....
Stormchaser
LLX: not if you want to get key = value pattern dinamically.
'Poll'?
Pollita
LLX: But where would he find 1.21 Jiggawatts?
Stormchaser
on the INTERNET!
jiggster
someone call me?
Pollita
1-900-JIGG-4YOU
jiggster
lol
aeg
i think i have to wswitch my fluxcruistals to
jiggster
get mah jigg on oh yeah
         

LLX
well well i really just need to get the 1 from checked, into oen varible, "tableclotsh" from "<!--InstenceName-TABLECLOTHS-InstenceName-->" into another, etc...
jiggster
ohhhhh sprained something... *hobbles off to the doctors*
btraut
I'm writing an app for a friend who is running PHP/Apache on Windows. When I specify a file path (IE: as a parameter to a function), do I need to use forward-slash?
Pollita
jiggster: We were just discussing time travel, go back to your business
sredna
Is there something like a object dumper in php?
Pollita
btraut: Technically you can use either, but I recommend using forward-slash
jiggster
time travel to the future, quite impossible
sredna
Something that can print the content of an object?
jiggster
the past, less impossible
Stormchaser
sredna: print_r()
sredna
Stormchaser: ?
Pollita
e.g.: fopen('/foo/bar','r') == fopen('\\foo\\bar','r')
caffinated
save a backslash tree. support unix paths.
sredna
Object->print_r()?
Pollita
The reason why *should* be obvious (the backslashes need escaping the forwardslashes don't)
LLX
well lets see what hapens
Pollita
jiggster: I'm traveling to the future right now
Stormchaser
sredna: Um... no... print_r($object)
Pollita
there! I just did it again
and again!
I'M UNSTOPPABLE!
Stormchaser
Pollita: You can't do that...
         

jiggster
lol
nice
sredna
Stormchaser: Does that print to STDOUT?
Stormchaser
sredna: yes
Pollita
Stormchaser: ...on television?
Stormchaser
Pollita: no... you forgot your car keys :)
sredna
Stormchaser: Ty
(Action) sighs
aeg
if you see Dr Who .. pls ask him if there is a special func to search in a 2 dim array ( in this time frame)
falieson
www.worldenergies.net (here is the code -> http://pastebin.com/548974 ) the poll doesn't work. when you submit a suggestion it will not send the query to the db. and if you simply try and vote - you get nothing
b1n0ry
speaking of which, does anyone know a php script for a time machine? i need to go back to about 20 minutes ago so i can leave work before the rush hour traffic
Flying_Cow
How can I make this possible $op = +; I need to store it.
LLX
i think im almostgot it
Stormchaser
$op = '+';
Flying_Cow
sweet
jiggster
*sigh*
this channel hurts sometimes
LLX
bugger its preg matchign alright but its not updatingon a loop
IrcMonkeyUser309
Hey. Has anyone tried PHP with apache 2.2 yet?
bch2
IrcMonkey - yes
jiggster
IrcMonkeyUser309: i havent but i've been meaning to
Stormchaser
I have it working with a2.3 -- I don't see why 2.2 would be different...
falieson
I feel ignored, I have been struggling with thise code for almost a day now
LLX
storm: $isChecked = preg_match('<!--Checked-(.*?)-Checked-->', $PagesArr[$k]); is returning one no materwhat my data says
any ideas?
^pirate
Hi, can someone help me with some PHP code? http://pastebin.com/548990 <- I need to force this table to only allow 3 rows; is there a way that I can implement a counter so that every 3 columns introduces a <TR> or something? I'm completely stuck.
3 columns**
jiggster
$i=0; $i++ if($i==3) { $i = 0; }
oh yeah
LLX
is it populated by a for or while loop?
Stormchaser
LLX: Please read php.net/preg_match
!+func preg_match
php-bot
int preg_match(string pattern, string subject [, array subpatterns [, int flags [, int offset ]]]): Perform a Perl-style regular expression match
brendyn
Hi All. I'm trying to use some sort of static class variables in PHP 4 and am trying to keep an array as a static variable that holds a bunch of parameters that should be available to all instances of a class after the first one is created. Is there a way to do this?
wundaboy
where can i read about the differences between php5 and php6?
Falc
PHP 6 is released?
Pollita
hah
no
wundaboy
the topic says php 6.0.0-dev
i just want to know the differences...
mazza[W]
read: unstable
wundaboy
like what their improving
Pollita
wundaboy: PHP6 is primarily about improving support for unicode
wundaboy
i.e. how they change objects...
Pollita
The OOP model is going to be largely untouched
wundaboy
:)
Pollita
A few directives are being dropped though
Falc
Hmmm. I think you sohuld wait till the release of 6,PHP 6 will most likely change as it progresses into a stable release.
Pollita
magic_quotes_* for example
And ze1_compatability_mode
LLX
i jsut don think ill ever get the hag of preg_anthing
Colloid
how can i access network neighbourhood through the cmd prompt on win32?
Pollita
LLX: At some point you'll have an "AH HAH!" moment and it'll all crystalize
Colloid: NET HELP
wundaboy
what is unicode?
brendyn
anyone have any suggestions for me? I'm kind of desperate =)
TML
How do I reignite the fire in my marriage?
(As long as Pollita's answering everything)
Flying_Cow
well .. $op = '-'; wasn't quite what I was looking for. I wan't it to evaluate as usual. echo (2 $op 1); should echo 1. Not "2 - 1"
Pollita
wundaboy: It's a superclass of character sets, helpful for i18n
wundaboy
TML: i just got my gf some HOT underwear, you might try the same thing ;)
Pollita
TML: Try doing it in a new location, maybe let her use the penis for once.
TML
<:O
Pollita
Yes, hold your mouth just like that
TML
heh
Pollita
mind the teeth
TML
Flying_Cow: $op = 'bcadd'; $op(1, 2);
Flying_Cow
ok nice.
Pollita
Flying_Cow: eval("echo (2 $op 1);");
However:
TML
Pollita: I'll have to ask the Mrs., but it seems unlikely she'd fancy that much.
Pollita
!+eval
php-bot
If eval() is the answer, you're almost certainly asking the wrong question. -- Rasmus Lerdorf, BDFL of PHP
mazza[W]
heh
LLX
well thanks anyway il try to tinker abotu and get the hango f preg
brendyn
so what's the rule for repeating your question if no one's answered it yet? =)
arcannon
brendyn: Ive been reading it over, but i'm not sure what you are asking.
brendyn
okay
TML
brendyn: Go ahead and repeat
monkeypoo
is there any software or even a paper version of something that can help me manage a software project which is too large just to code it in one go?
brendyn
can i PM to try to explain it better? it's a fricken beast and im having problem making it clear.
arcannon
brendyn: are asking for "global varname;" ?
brendyn
let me try
so I have a class that loads up its attributes dynamically on creation. this is incredibly inefficient if 1000 objects are created because it = 1000 db queries
TML
monkeypoo: You'll have to be more specific, because "a ream of paper and a pencil" would answer your question.
brendyn
im trying to find a way to "cache" the field names that i get from the db query that initializes the class attributes after the first object is created
so that the later objects can reference it instead of doing another db query
LLX
peace
insin
brendyn: hold the attribute definitions in an array keyed with the objects name
monkeypoo
i'm just having trouble with this program i'm writing. it's too large.
insin
I do that in one of my classes which does the same thing
arcannon
brendyn: Declare a global array and each key will be your cached field name?
brendyn
okay
so something like $_GLOBALS['ClassName']['attributes']
frbk
brendyn: have you tried a "define" statement ?
brendyn
and that holds all the attributes?
monkeypoo
defines don't hold arrays
brendyn
yeah
frbk
oh, i forgot that it was an array, sorry.
TML
You'd have to do one constant per attr
insin
you could do that. Personally, I keep the array in my DB abstraction object
brendyn
hmm
can you explain that a bit more?
TML
define("FOO", $bar['foo']); define("BAR", $bar['bar']);
brendyn
in your abstraction object?
monkeypoo
try this: make one class that has all the data you want shared. then globally refer to ti from all other classes
insin
brendyn: http://www.jonathanbuchanan.plus.com/repos/activerecord/db/mysql.php
the getFieldsForTable($table) function
brendyn
ah
yeah he uses a global $FIELD_MAPPING
ok
insin
$_tableFieldCache is used to cache definitions by table name
brendyn
okay
cool.
one thing i need to make sure, though, is that that global gets cleared the first time the first object is created
in case changes to the db table's fields have been made
insin
*during* a request? O_O
brendyn
nah
this is probably a beginner's question, but does the global array clear on each page load?
« prev 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 next »