i want to create an admin-interface where customers can edit a config-file and restart the corresponding service

static_call(); ..

yeah, i know, it's just a habit.

flowOver void main() "works" too. I wouldn't be suprrised if that's what you use, considering that you learned C without a book or tutorial

vb… well, that's a somewhat better excuse, but the whole idea of polish notation was to indicate what sort of information was in the variable, not what data-type it was
uvb… well, that's a somewhat better excuse, but the whole idea of polish notation was to indicate what sort of information was in the variable, not what data-type it was/u

I've had enough bad experience with w3schools to stay away

intFoo /* useless name */ priceFoo /* somewhat less useless */
bintFoo /* useless name */ priceFoo /* somewhat less useless *//b

really using mysql and php isn't difficult at all and if you know c so well it should be trivial. so before this erupts into a flamewar from only trying to help you out a bit, i'm going to ask you to please stop saying my name as it notifies me and there is no more discussion.

not enough parens.

my dad was a C programmer, when he started php, he wrote very counter-intuitive php

flowOver fine EOD. but please don't pretend you tried to help me

what was the question again?

i have $a = array('a','b','c'); and some $char … how can I get array $b without all elements of $a, but not with $char?

he's looking for a php/mysql tutorial.

array_filter

simpler even, how can I delete an element from an array
ok
thanks

you may also need to use array_values… depending on your key-reordering needs

unset($array['key'])

except he doesn't know 'key'

yes, I don't have any keys
it's not an associative array

I narrowed the fault down to one section of code. Which convieniently has a high number of off-file functions on it.

you do have keys, they're just numeric
and not relivant

$key = array_search ( $char, $array); unset($array[$key]);

integers, numeric can be "1"

ok..

are you telling me i can't call integers numeric?

well in php jargon, yes. numeric can refer to a string.

thanks

as in is_numeric?

ok, sounds like you are getting there

yes

flowOver, isn't that nitpicking?

33 ); not give me an array with one key and one value?

which framework is best to design UI for data entry and data manipulations ?

actually you may want to test the return value of array_search in case it doesnt fine the key… so that would be
$key = array_search ( $char, $array); ($key !== false) and unset($array[$key]);

you don't need a framework, you just need a form library. pear.php.net/html_quickform will do that for you

PHPadam, are you looking for a framework with auto scaffolding?

perhaps throw in some ORM for good measure

and next session_start() crashes without saying a word until i delete the file ?

what's scaffolding?

wwow i could've sworn previous tests did otherwise

shouldnt sesion_destroy remove the session file completely ?

sorry

rolfen, you haven't met Ruby on rails yet?

he just wants a form library, he doesn't want rails

no!

untill this day i have thought that "1" and 1 were seperate array indices

f00li5h, well, sorry, I really did not read that from his question.

they arnt?

they're not. also, 1e1 isn't the same as 1 and '1'
no. they're not

wtf
so $foo["1"] is the same as $foo[1] ?

22, )

i wonder if I can modify an array from within the loop over the values of that array

it is

man thats stupid

yes, it is

you mean inside the foreach?

yes

and it's not based on is_numeric either

in php , 1=="1" is true, but 1==="1" is false

because of the 1e1 staying as a strings

lets form a down with the "1" === 1 with array indices committy

as of php5 you can

right ok

you dont wanna enter that corner

"As of PHP 5, you can easily modify array's elements by preceding $value with &. This will assign reference instead of copying the value. "

there is one, they can be found in #any-other-langauge

example:
foreach ($arr as &$value) {
etc..
do you have the php manual?

ok, thanks
yes

because get/post/request params, data fetched from db , etc are all strings…

but it's kind of huge

what do you mean… do you have the chm version?

oh, no… I meant the web version

chm doesn't work so well on non-windows platforms, as far as i know

it's easyer to use

Is there a php based bbcode to allow the creation of tables?

i'm browsing it on ubuntu

you can get the search script that allows you to do php.net/something-interesting
and then just stick that in the doc-root of your php manual unzip

using gnoChm CHM viewer

that blows my mind. i still stand by that "1" is not an integer value though, only numeric

i believe i saw a chm2pdf somewhere

meow

how is '1' not an integer?
purr

of course "1" is not an integer, it's a string

just my preference i suppose. seems like string to me

echo 'php var_export("1" + 1 );' | php # 2
it looks like an integer to me

f00li5h, im back, about the framework for UI, i need to be able creating many data entry pages with nice layout

f00li5h, var_dump(is_int("1"));

well, you could use a template, html_quickform, and some kind of ORM
oh good lord, that's stupid

what is ORM ?

object relational mapping
it takes instances of classes, and stashes their attribues in table rows (and vice versa)

f00li5h, the fact that php automatically converts it as a numeric value when dealing with arithmetics doesn't make it an integer o.O

manual says it's a string being converted

1 is an integer

f00li5h, 1 is an integer, "1" isn't

for all intents and purposes, "1" is 1

yea but "1" is a string, which is converted

it looks like a duck, and it quacks like a duck

lol and it continues

where do i find an ORM ?

"1" == 1 but "1" !== 1

AgentScorpion for the win

is it possible to search for an array of text strings against $ variable?

there's pear.php.net/db_dataobjects, but i'd imaine there are better ones out there

hi, is there a way to remove the "URL?id1=X&id2=Y…" from the URL?

pff, we all know what "identity" means in php

this orm is interesting

hi, is there a way to remove the "?id1=X&id2=Y…" from the URL?

you could use a regex replace
replace /[?].*$/ with ''

thanks

try using a str replace using $_SERVER['QUERY_STRING']

i think he means something else foolish
what agent said

who is "he"?

or you could split the url

henrik

he said 'remove'

yeah but i think he means he wants to use the URL
just up to filename

which is the same thing…

or something along those lines. so he just needs what scorpion said

all i'm saying is it blows my mind that numeric string conversions happen on array indices

only some of the time though
it's not like '1e1' (which is numeric) is numified before use

$arr = explode('?', $url); array_php($arr); $url = implode('', $arr); that could work too

all of the time as according to the manual. that 1e1 evaluates to a float

array_php?

thats ok, I think I can do it now

oops

thanks to all

i meant array_php
aaaah
no

haha

i meant array_pop

array_pop?

yeah

array_mend

for goodness sakes, what's with all the daft half-cocked solutions?
just regex it's head off and get on with it

solutions for what?

this "remove the query string" question

i like to avoid using regex when possible

for the same reason you'd avoid version controll and external libraries?

i actually prefer using regex

regex is a bad solution, use parse_url(), simply.

though by no means am i a regex wizard

as of which version of php?

ekneuss, why would regexes be a bad solution?

well, it'd take about 20 seconds to figure out what [?].*$ means

f00li5h, php.net/parse_url

regex's are often overkill for the task

well yeah :-p
simple to moderate-level regex's aren't a problem for me.

substr(strstr())

what does explode use again?

is it possible to use STRPOS with a number of terms against a single term?

parse_url… :-)

berry__, because regexes are not always the right tool when working with strings

ie. find X,Y,Z in A and return true or false if one or all are found

i never advocated explode. for urls rolfen has the right idea

flowOver, what will happend if no query string are present? think

that was ekneuss 's idea

i wonder if anyone's written decent O/S code for a powerpoint viewer

flowOver, with his explode solution, I mean

okay sorry, ekneuss has the right idea

you're right, the whole url will disappear

ouch :]

if you parse_url it, you'll have to stick the url back together

that's not a big deal

it's a whole lot more work that just regexing the ? onwarard off though
and you're going to have to check if isset for all the keys, if you're running E_ALL

no you don't

oh?

Dynom…?

hmm ?

ekneuss, you're right, regexes are not always the right tool for everything.

I narrowed it down to one line of code… a include… but the file it is including has no php code in it…
It is the last line.

..
interesting
what is your include path ?

ofcourse regexes are not the right tool for every job, they suck at numeric ranges, and they're also quite poor at listening for TCP connections

include "file_name.php";

regexes are hard to debug

no I mean the setting

are they?

in my opinion

ah, do you use /x?
’cause that makes it a bundle easier to debug them

what is /x?
i'll check that out

I have a page that do a refresh in 30sec, and I do a action that goes to another page, and return to the previous 5 sec later, and the action that I toke what to put it inactive till the next refresh, to do this, i'm using the parameters in the URL! this last refresh, I want to pass one
parameter to -1!

me too

extend your regex's readability, by allowing whitespace, and #'ed comments in the regex

The setting…?

:-]
echo ini_get('include_path');

there is also get_include_path()

ah

you can just re-create the url from $_GET… that'd do it

.;Cphp5\pear

whats the filename called

thanks

template_bottom.php

include(dirname(__FILE__) . 'template_bottom.php');
hmm
might need an extra '/'
include(dirname(__FILE__) . '/template_bottom.php');

do i need to install pear if i wanna use its extensions?

it'd make it easier

cute when you put it like that tbh

Nope… nothing.

ok, by that I asume still the weird stuff, no errors. Correct?

No errors.

:]

you're eating zip soup?

and if you remove the template include it works as intended?
no instant tomato soup stuff

If I die(); before the template include it works. I haven't tried removing yet. Will now.
Yes it works when removed.

k, then on to the template file

I will pastebin it.

does it by chance include something that might SQL something ?
yeh

No php code.

3 debug classes

O.o
and if you do include the template file your page fails ?
what javascript voodoo do you have in it ?

It includes as intended, but messes with the SQL.
http://rafb.net/p/EY61tl69.html

I have a problem with session timing out when user is editing something (slow users, it takes a while).. how can I set it to something more reasonable, like a few hours?

3 7 hour critical project bugs that drive me insane.

is it just one place?

depends on your session code

i need an extension that shuts down my boss

oktanouc, so it's possible.. it's simple session_start

hehe

Heh.

im kidding, he is nice (i hope he is not here)

did you try "knowing what you're doing"?

well I see a 'IE comment' syntax error, but that about it :-|

who's oktanouc?

oh, sorry oktanouc, stupid inck expansion

f00li5h, too many errors

Hi
anyone here using creole?

you don't know what you're doing because there are too many errors?

I don't see how that affects PHP.

exactly

didn't work at 4 in the morning…

^_^

hi, is there a function that returns me the classname of the classname is currently in?
*class

Adriaan, get_class()

ekneuss, thanks

error_reporting = E_ALL & ~E_NOTICE & ~E_STRICT

& ~E_STRICT is quite useless, E_ALL doesn't contain E_STRICT for now

ekneuss, is there also a possibility to return the classname of the child that currently is extending the class?
ekneuss, like child

*
To prove that you're not a bot, enter this code
Anti-Spam Image

Comments are closed.


Blog Tags:

Similar posts: