Re: [PHP] Try{} Catch()

2008-01-01 Thread Martin Alterisio
2007/12/31, Richard Lynch <[EMAIL PROTECTED]>: > > On Sun, December 23, 2007 3:50 pm, Martin Alterisio wrote: > > It's not supposed to be practical, it's just a way to handle errors. > > You > > shouldn't rely on try/catch for algorithm implementation.

Re: [PHP] Sayonara PHP

2007-12-28 Thread Martin Alterisio
he future (... ok, that was kind of The > Godfather's script, lol). > > Enjoy your holidays, > > Rob > We'll see... for now I'll follow the stupid decision of finally doing what I intended when I began this whole dance of software development. I hoping with all my heart that this will go well and I'll never have to work in web development again. If not, well, I'll come back to whatever it's that's being used in that specific moment, be it PHP or whatever may come. Just know that I'm not leaving for some petty reason. And I really hope that someone else could find anything sensible in the things I posted in the first mail, and keep on building on top of them. Best Regards and Happy New Year, Martin Alterisio

Re: [PHP] Re: [PHP-DEV] Sayonara PHP

2007-12-28 Thread Martin Alterisio
"I liked the php development market because it was safe, but now I doubt its safety". That's all. I don't think that rant may be of use to anyone, but at least it felt nice to let go of some steam. Best Regards and Happy New Year, Martin Alterisio

[PHP] Sayonara PHP

2007-12-25 Thread Martin Alterisio
Please let me do a little explanation of the title first. Japanese is an interesting language where context is vital to the meaning of a word. Sayonara usually means a simple "good bye", but within a different context can mean "we'll probably never meet again". To understand this mail you'll have

Re: [PHP] Try{} Catch()

2007-12-23 Thread Martin Alterisio
It's not supposed to be practical, it's just a way to handle errors. You shouldn't rely on try/catch for algorithm implementation. You create exceptions for errors and unexpected behavior. Then in some other part of the system you use try/catch to prevent the code from terminating abruptly. You ca

Re: [PHP] // ?>

2007-12-04 Thread Martin Alterisio
2007/12/4, Kevin Schmeichel <[EMAIL PROTECTED]>: > > Here's some unexpected behavior: > > // ?> what? > ?> > > This will output "what?" - I expected no output, as is the case if the > inline comment was a /* */ comment. Is this a bug? > Expected behavior. Read the manual: http://php.net/manual/

Re: [PHP] Structured Code vs. Performance

2007-12-03 Thread Martin Alterisio
2007/12/2, tedd <[EMAIL PROTECTED]>: > > Oh yes, it's very much like fractals, but the term "fractalism" is > usually reserved for art forms based on fractals. > > However, one could conclude that all crystalline forms are a > "real-world" examples of fractals. In similar vein, all repetitive > pro

Re: [PHP] Structured Code vs. Performance

2007-12-02 Thread Martin Alterisio
2007/12/2, tedd <[EMAIL PROTECTED]>: > > > To me, good structure starts at the function level. Like the lattice > of a crystal, coding grows and reflects the most basic element. Keep > that element consistent and you'll find that it will be reflected in > everything you do. > > How's that for philo

Re: [PHP] sprintf() oddness

2007-12-02 Thread Martin Alterisio
2007/12/1, Christoph Boget <[EMAIL PROTECTED]>: > > Why does > > sprintf( '%.03f', 0.1525 ) > > return 0.152 while > > sprintf( '%.03f', 0.1575 ) > > return 0.158? > Welcome to the world of f floating point numbers. Discrete mathematics, leave all hope, ye that enter. It's the way fl

Re: [PHP] Code Critique Please :)

2007-11-26 Thread Martin Alterisio
2007/11/21, Simeon F. Willbanks <[EMAIL PROTECTED]>: > > Hello, > > I am trying to increase my knowledge and understanding of OO and OO > Design Patterns. I'd like to request a critique of a program that > extracts MySQL table information and translates it into XML. In the > program, I tried to a

Re: [PHP] Regular Expressions

2007-11-06 Thread Martin Alterisio
2007/11/6, Alberto García Gómez <[EMAIL PROTECTED]>: > > I'm a mess in regular expressions and I make this code: > > $link = ereg_replace('ñ','n',$link); > $link = ereg_replace('á','a',$link); > $link = ereg_replace('é','e',$link); > $link = ereg_replace('í','i',$link); > $link = ereg_replace('ó','

[PHP] A workaround for type hinting native types (and a little of self-advertising)

2007-11-06 Thread Martin Alterisio
$me->apologizeFor($this->isSelfAdvertising()); if ($you->lookingFor($php->workaround(TYPE_HINT_FOR_NATIVE_TYPES)) { check('http://www.phpclasses.org/browse/package/4195.html'); } $package = new Package('http://www.phpclasses.org/browse/package/4195.html' ); $package->usageExample = <

Re: [PHP] counting with leading zeros

2007-10-01 Thread Martin Alterisio
// glob returns an ordered list (rtfm: man glob) // relies on the use of the operator ++ to generate string sequences. function lastFileInSequence($path, $prefix, $first, $suffix) { return array_pop(glob($path . "/" . $prefix . str_repeat('?', strlen($first)) . $suffix)); } function nextFileI

Re: [PHP] Classes and access to outside variables

2007-09-30 Thread Martin Alterisio
That's incorrectly syntactically. Won't run. Ok, let's write some code to show how this can be done: class SearchHelper extends AjaxACApplication { private $dbh; public function __construct() { $this->dbh = $GLOBALS['dbh']; } } Better yet, pass the database host in the cons

Re: [PHP] Classes and access to outside variables

2007-09-29 Thread Martin Alterisio
Refer to the global on the constructor. Anyway, using a global like that is not a good practice. Just pass the variable to the constructor. 2007/9/29, Merlin <[EMAIL PROTECTED]>: > > Hi there, > > I am new to PHP classes and I do want to access a variable outside the > class, but somehow that doe

Re: [PHP] function -> action

2007-08-10 Thread Martin Alterisio
2007/8/7, Richard Lynch <[EMAIL PROTECTED]>: > > On Fri, August 3, 2007 1:38 am, Ralph Kutschera wrote: > > I'm working on a project, where we distinguish between "functions" > > and > > "actions" in design, although in PHP both are implemented as > > functions. > > Is there a chance that PHP can

Re: [PHP] function -> action

2007-08-10 Thread Martin Alterisio
2007/8/3, Ken Tozier <[EMAIL PROTECTED]>: > > > On Aug 3, 2007, at 9:39 AM, Ken Tozier wrote: > > > > > On Aug 3, 2007, at 2:38 AM, Ralph Kutschera wrote: > > > >> Hallo! > >> > >> I'm working on a project, where we distinguish between > >> "functions" and > >> "actions" in design, although in PH

Re: [PHP] Re: Design Dilemma - Database Data Abstraction

2007-04-11 Thread Martin Alterisio
2007/4/11, Roman Neuhauser <[EMAIL PROTECTED]>: # [EMAIL PROTECTED] / 2007-04-09 19:45:41 -0300: > Thanks but that's not what I'm looking for. As I said before, my problem > isn't to find an implementation of an ORM, but that the concept I'm working > on will use a very restricted API (array ope

Re: [PHP] Design Dilemma - Database Data Abstraction

2007-04-11 Thread Martin Alterisio
2007/4/10, Richard Lynch <[EMAIL PROTECTED]>: On Sat, April 7, 2007 11:49 am, Martin Alterisio wrote: > The solution I presented is to access, and act upon, a database as if > they > were PHP arrays, meaning that a table is presented as an array of > records. I don't

Re: [PHP] Re: Design Dilemma - Database Data Abstraction

2007-04-09 Thread Martin Alterisio
2007/4/9, Tony Marston <[EMAIL PROTECTED]>: ""Martin Alterisio"" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] >I have a dilemma on a design where I humbly ask your help. I'm working on > the model part of a web application (not to be

Re: [PHP] Design Dilemma - Database Data Abstraction

2007-04-09 Thread Martin Alterisio
2007/4/9, Lester Caine <[EMAIL PROTECTED]>: Martin Alterisio wrote: > I have a dilemma on a design where I humbly ask your help. I'm working on > the model part of a web application (not to be understood in the "web2.0 " > way, but in a more general way, where any

Re: [PHP] Design Dilemma - Database Data Abstraction

2007-04-08 Thread Martin Alterisio
2007/4/8, Paul Novitski <[EMAIL PROTECTED]>: At 4/7/2007 09:49 AM, Martin Alterisio wrote: >The solution I presented is to access, and act upon, a database as if they >were PHP arrays, meaning that a table is presented as an array of records. This implies to me that you'll

[PHP] Design Dilemma - Database Data Abstraction

2007-04-07 Thread Martin Alterisio
I have a dilemma on a design where I humbly ask your help. I'm working on the model part of a web application (not to be understood in the "web2.0" way, but in a more general way, where anything mounted on HTTP is a web application) done in PHP5 following the MVC design pattern. But the strong poi

Re: [PHP] finding a particular record within a MySQL result set

2007-04-04 Thread Martin Alterisio
2007/4/4, James Tu <[EMAIL PROTECTED]>: I've cross posted this to the MySQL list... Here's my original post. > Is there some quick way to do the following in MySQL? (I know I > can use PHP to search through the result set, but I wanted to see > if there's a quick way using some sort of query)

Re: [PHP] References challenge with PHP4

2007-03-25 Thread Martin Alterisio
2007/3/23, Jochem Maas <[EMAIL PROTECTED]>: Martin Alterisio wrote: > 2007/3/20, Jochem Maas <[EMAIL PROTECTED] >: > > Robert Cummings wrote: > > On Tue, 2007-03-20 at 11:52 +0100, Jochem Maas wrote: > >> ok, I tried it in a whole nu

Re: [PHP] References challenge with PHP4

2007-03-21 Thread Martin Alterisio
2007/3/20, Jochem Maas <[EMAIL PROTECTED]>: Robert Cummings wrote: > On Tue, 2007-03-20 at 11:52 +0100, Jochem Maas wrote: >> ok, I tried it in a whole number of variations - >> no joy. >> >> you should use php5 if you want this kind of reference >> stuff - in php5 it just works, php 4 will give

Re: [PHP] Variable variables and references

2007-03-11 Thread Martin Alterisio
2007/3/10, Dave Goodchild <[EMAIL PROTECTED]>: Hi guys, I have just read 'Programming PHP' (O'Reilly) and although I think it's a great book, I am confused about variable variables and references - not the mechanics, just where you would use them. The subject of variable variables is explained

Re: [PHP] OT - Regular Expression

2007-02-09 Thread Martin Alterisio
2007/2/9, Martin Alterisio <[EMAIL PROTECTED]>: If you want to do it in one regular expression, without listing each case, you can use a lookahead assertion: /^(?=.*8.*)[0-9]{4}$/ The assertion (?=.*8.*) checks that the following matches the expression contained (.*8.*) which fails if t

Re: [PHP] OT - Regular Expression

2007-02-09 Thread Martin Alterisio
If you want to do it in one regular expression, without listing each case, you can use a lookahead assertion: /^(?=.*8.*)[0-9]{4}$/ The assertion (?=.*8.*) checks that the following matches the expression contained (.*8.*) which fails if there is not an 8. 2007/2/9, Peter Lauri <[EMAIL PROTECTE

Re: Re[2]: [PHP] nested, referenced foreach & implicit current array pointer issues

2007-01-31 Thread Martin Alterisio
2007/1/30, speedy <[EMAIL PROTECTED]>: Hello Martin, > Tuesday, January 30, 2007, 8:45:50 PM, you wrote: > > function f() > { >global $arr; > >foreach($arr as $k=>$v) { >$v->do_something(); >} > } > > I don't see your point anywhere... foreach iterates over a copy of > the

Re: [PHP] nested, referenced foreach & implicit current array pointer issues

2007-01-30 Thread Martin Alterisio
2007/1/30, speedy <[EMAIL PROTECTED]>: Hello PHP crew, As a followup to: http://bugs.php.net/bug.php?id=22879 That's not a bug, just an user doing things the wrong way and blaming the language. I've stumbled upon this problem in a way: function f() { global $arr; foreach($arr as $

Re: [PHP] preg_match problem

2007-01-23 Thread Martin Alterisio
2007/1/22, Beauford <[EMAIL PROTECTED]>: ... much blah blah blah ... I've probably read 100 pages on this, and no matter what I try it doesn't work. Including all of what you suggested above - is my PHP possessed? if(preg_match("/[EMAIL PROTECTED]&()*;:_.'/\\ ]+$/", $string)) { gives me this

Re: [PHP] preg_match problem

2007-01-21 Thread Martin Alterisio
2007/1/20, Arpad Ray <[EMAIL PROTECTED]>: Martin Alterisio wrote: > Double slash to prevent PHP interpreting the slashes. Also using single > quotes would be a good idea: > > if (preg_match('/[\\w\\x2F]{6,}/',$a)) > Just switching to single quotes would do the t

Re: [PHP] preg_match problem

2007-01-20 Thread Martin Alterisio
Double slash to prevent PHP interpreting the slashes. Also using single quotes would be a good idea: if (preg_match('/[\\w\\x2F]{6,}/',$a)) 2007/1/19, Németh Zoltán <[EMAIL PROTECTED]>: Hi all, I have a simple checking like if (preg_match("/[\w\x2F]{6,}/",$a)) as I would like to allow all

Re: [PHP] nuSoap -method '' not defined in service

2007-01-20 Thread Martin Alterisio
Try the following: $server->register('getColumns', array(), array()); The second argument is an array containing an entry for each argument of the webservice call, and the third argument is an array for the return value. Since you don't have either arguments nor return value, empty arrays should

Re: [PHP] classes and objects: php5. The Basics

2007-01-16 Thread Martin Alterisio
Forgot to mention that calling a non-statical function this way should generate an E_STRICT warning. 2007/1/16, Martin Alterisio <[EMAIL PROTECTED]>: Backward compatibility with PHP4, where member functions couldn't be declared as static. Any member function could be called

Re: [PHP] classes and objects: php5. The Basics

2007-01-16 Thread Martin Alterisio
Backward compatibility with PHP4, where member functions couldn't be declared as static. Any member function could be called statically providing a static context instead of an object instance. 2007/1/16, Cheseldine, D. L. <[EMAIL PROTECTED]>: Hi I'm stuck on The Basics page of the php5 Object

Re: [PHP] Basic question - Starting a background task without waiting for its end.

2007-01-01 Thread Martin Alterisio
2006/12/31, Michel <[EMAIL PROTECTED]>: I (very simply) try to open a "notepad" on a simple text file in a simplistic PHP script, and would like to go on and display the next page without waiting for this notepad to be shut. After various attempts, I have used an : exec ('bash -c cmd /C start

Re: [PHP] array_intersect problem

2006-12-25 Thread Martin Alterisio
2006/12/25, Leo Liu <[EMAIL PROTECTED]>: Hi, I try to intersect associative array and it seems to fail to do so. Can anyone show me a walk around? For example I have array1 Array ( [0] => Array ( [imageID] => 1 ) [1] => Array (

Re: [PHP] Clarification: Jump to a record/PHP paging...

2006-12-25 Thread Martin Alterisio
2006/12/25, Robert Cummings <[EMAIL PROTECTED]>: WRONG! See Martin Alterisio's post for the same thread. You must not have understood the OP's requirements. xD I was starting to think my mails weren't getting through the list, maybe its nothing else than only a bigger delay than the usual. A

Re: [PHP] Odd behavior

2006-12-25 Thread Martin Alterisio
2006/12/25, jekillen <[EMAIL PROTECTED]>: On Dec 25, 2006, at 7:21 AM, Roman Neuhauser wrote: > # [EMAIL PROTECTED] / 2006-12-24 18:11:03 -0800: >> function display($list, $in, $out, $save, $req, $x) >> { >> for($i = 0; $i < count($in); $i++) >> {$j = $i + 1; >> // two sets

Re: [PHP] Clarification: Jump to a record/PHP paging...

2006-12-24 Thread Martin Alterisio
To solve a problem like yours I ussualy do the following: First you need to use a deterministic order criteria when displaying the results, this means that according to the order columns you provide, MySQL will not have to decide how to order two rows that have the same values for this columns. F

Re: [PHP] EZ array problem - What's wrong with my brain?

2006-12-04 Thread Martin Alterisio
2006/11/30, Brian Dunning <[EMAIL PROTECTED]>: var_dump() gives me this: array(1) { ["1.2"]=> array(2) { ["code"]=> array(1) { [0]=> string(3) "111" } ["status"]=> array(1) { [0]=> string(3) "new" } } } I'm trying to set a vari

Re: [PHP] Help on objects

2006-10-05 Thread Martin Alterisio
2006/10/5, Satyam <[EMAIL PROTECTED]>: - Original Message - *From:* Martin Alterisio <[EMAIL PROTECTED]> *To:* Satyam <[EMAIL PROTECTED]> *Cc:* Deckard <[EMAIL PROTECTED]> ; php-general@lists.php.net *Sent:* Thursday, October 05, 2006 3:50 PM *Subject:* Re: [PH

Re: [PHP] Re: OOP Hello World

2006-10-05 Thread Martin Alterisio
2006/10/5, John Wells <[EMAIL PROTECTED]>: On 10/5/06, Martin Alterisio <[EMAIL PROTECTED]> wrote: > PHP seems to be getting more and more object oriented, I think it's the > right time to start questioning what have been done so far in terms of OOP > in PHP, becaus

Re: [PHP] Help on objects

2006-10-05 Thread Martin Alterisio
2006/10/5, Satyam <[EMAIL PROTECTED]>: I've seen you already had a good answer on the errors in the code so I won't go on that. As for OOP, the one design error you have is that you are asking for an action, not an object. You want to make SQL inserts, that is your purpose, and that is an act

Re: [PHP] Help on objects

2006-10-05 Thread Martin Alterisio
2006/10/4, Deckard <[EMAIL PROTECTED]>: Hi, I'm trying to lay my hands on PHP OOP, but it's not easy :( I've read several examples in the web, but cannot transpose to may case. I'm trying to set a class to make SQL inserts in mysql. I have the class: --

Re: [PHP] Re: OOP Hello World

2006-10-05 Thread Martin Alterisio
, John Wells <[EMAIL PROTECTED]>: Are you sure you're not on a Spanish *Java* mailing list? :) On 10/5/06, Martin Alterisio <[EMAIL PROTECTED]> wrote: > Me... again, still boring you to death with meaningless OOP rantings. > > First I would like to point out that there wa

[PHP] Re: OOP Hello World

2006-10-04 Thread Martin Alterisio
the decorated saluters (this last part I thought it just now, I'll post it later on the spanish list) Well, I think that sums it all up. 2006/9/29, Martin Alterisio <[EMAIL PROTECTED]>: What's up folks? I just wanted to tell you about a thread that's going on in the spanish

Re: [PHP] class usage

2006-09-29 Thread Martin Alterisio
2006/9/29, Ray Hauge <[EMAIL PROTECTED]>: I think people have pretty much hit the nail on the head with OOP. One thing that I would like to point out is that OOP isn't necessarily needed in every case. Actually there's never a need to use OOP. As I said before OOP doesn't provide anything in

Re: [PHP] Re: class usage

2006-09-29 Thread Martin Alterisio
2006/9/29, M.Sokolewicz <[EMAIL PROTECTED]>: Well, you could say that there is no difference really. Classes are mainly used as collections; They're a collection of functions (methods) sharing a common goal/dataset/whatever. That's a module, my friend, not a class: http://en.wikipedia.org/wik

Re: [PHP] class usage

2006-09-29 Thread Martin Alterisio
2006/9/29, benifactor <[EMAIL PROTECTED]>: ok, about five minutes ago i decided to learn classes and delve into php's oop side. what i came up with was this... //start example code class newsletter { function send ($email,$subject,$message) { if ($email) { echo("th

[PHP] OOP Hello World

2006-09-28 Thread Martin Alterisio
What's up folks? I just wanted to tell you about a thread that's going on in the spanish php mailing list. A fellow software developer which had just started with OOP was asking for "Hello World" examples using OOP. The examples of code he had been doing was not that different from the usual Hell

Re: [PHP] How do i check if a variable is a reference or a copy?

2006-09-28 Thread Martin Alterisio
2006/9/28, Mathijs <[EMAIL PROTECTED]>: Hello there, Is there a way to check if a variable is passed by reference or if it is just a copy. With something like is_copy or is_reference? Thx in advance. Is this part of the "I don't know if two vars reference the same object in PHP4" dilemma?

Re: [PHP] array_sum($result)=100

2006-09-25 Thread Martin Alterisio
2006/9/25, Robin Vickery <[EMAIL PROTECTED]>: On 24/09/06, Ahmad Al-Twaijiry <[EMAIL PROTECTED]> wrote: > Hi everyone > > I have array of numbers and I want to get out of it a list of numbers > that if I sum them it will be 100, here is my list (for example ) : > > $list = array(10,20,10,10,30,5

Re: [PHP] Help converting C to PHP

2006-09-22 Thread Martin Alterisio
2006/9/22, Tom Atkinson <[EMAIL PROTECTED]>: Martin Alterisio wrote: > 2006/9/22, Rory Browne <[EMAIL PROTECTED]>: >> >> On 9/22/06, Kevin Waterson <[EMAIL PROTECTED]> wrote: >> > >> > This one time, at band camp, "Curt Zirzow&

Re: [PHP] Help converting C to PHP

2006-09-22 Thread Martin Alterisio
2006/9/22, Rory Browne <[EMAIL PROTECTED]>: On 9/22/06, Kevin Waterson <[EMAIL PROTECTED]> wrote: > > This one time, at band camp, "Curt Zirzow" <[EMAIL PROTECTED]> wrote: > > > what about using: > > php.net/pi > > > > note the precision description. > > > > or are we talking about a different

Re: [PHP] Iteration through letter

2006-09-15 Thread Martin Alterisio
2006/9/14, Norbert Wenzel <[EMAIL PROTECTED]>: Hi, just for fun I tried the following code: for($letter = 'A'; $letter <= 'Z'; ++$letter) { echo($letter . ' '); } What surprised me was the output, which looked like this: A B C [...] Y Z AA AB AC [...] YY YZ I don't have any idea h

Re: [PHP] Error Handling Library?

2006-08-31 Thread Martin Alterisio
I'm curious, what features are you looking for in an error handling library? 2006/8/31, Jay Paulson <[EMAIL PROTECTED]>: I've been doing some research and was wondering if anyone out there has written a library for error handling? I haven't found anything as of yet but would love to hear sugge

Re: [PHP] Mixing sprintf and mysql_real_escape_string

2006-08-07 Thread Martin Alterisio
2006/8/7, Peter Lauri <[EMAIL PROTECTED]>: I should maybe add that the data actually comes from a form: mysql_query(sprintf("INSERT INTO table (value1, value2) VALUES (1, '%s')", mysql_real_escape_string($_POST['formvalue']))); And when I have ' in the field, it will insert \' into the databas

Re: [PHP] How to get rid off empty elements of an array?

2006-08-07 Thread Martin Alterisio
2006/8/7, [EMAIL PROTECTED] <[EMAIL PROTECTED]>: Hi to all! I have a form with 6 text fields where visitor has to enter product serial number (same type data). he has to enter AT LEAST ONE. for ($i=0; $i<6; $i++) { echo ''; } After the form is submitted I'm getting an array Array ( [

Re: [PHP] Re: PHP Frameworks - Opinion

2006-08-06 Thread Martin Alterisio
2006/8/4, Manuel Lemos <[EMAIL PROTECTED]>: Hello, on 08/03/2006 05:18 PM Martin Alterisio said the following: >> Anyway, you may want to read this more in depth reflection of the state >> of the PHP framework world and recommendations on how to pick what suits >>

Re: [PHP] Re: PHP Frameworks - Opinion

2006-08-03 Thread Martin Alterisio
2006/8/3, Manuel Lemos <[EMAIL PROTECTED]>: Hello, on 08/01/2006 01:35 PM Gabe said the following: > What's the common consensus as to a solid PHP framework to use for > application development? There seems to be a number of them out there, > but I'm not sure which one's are the most robust, a

[PHP] PHP Love Letter

2006-07-18 Thread Martin Alterisio
Been quiet too much... *This time, I seriously advise against running this piece of code unless you know what you're doing* Enjoy... --- Love Letter acquaintances)) { ?> Dear name?>, I really enjoy your company and I would love to meet you again. I had a lot of fun last time and I

[PHP] Re: Sad PHP Poem

2006-06-30 Thread Martin Alterisio
2006/6/26, Martin Alterisio <[EMAIL PROTECTED]>: A sad poem of an algorithm where solitude brought excessive use of cpu cycles and memory allocation for redundant data (it copied over and over again the same image till all memory was filled w

Re: [PHP] working on a template system...

2006-06-28 Thread Martin Alterisio
essy... /* The Smarty way */ $smarty->assign('display_variable',$display_variable); ... {* template *} {foreach key=key item=var from=$display_variable} {$key}{$var} {/foreach} /* The PHP way */ $var) { ?> Is it really *that* bad? jon Martin Alterisio wrote: >

Re: [PHP] working on a template system...

2006-06-28 Thread Martin Alterisio
2006/6/28, Robert Cummings <[EMAIL PROTECTED]>: On Wed, 2006-06-28 at 07:32, Martin Marques wrote: > On Wed, 28 Jun 2006, Ligaya Turmelle wrote: > > > Martin Marques wrote: > >> Why not try to use one of the template systems that already exist? > >> HTML_Template_IT, Smarty, etc. > >> > > Or jus

Re: [PHP] Sad PHP Poem

2006-06-25 Thread Martin Alterisio
2006/6/26, Ligaya Turmelle <[EMAIL PROTECTED]>: Martin Alterisio wrote: > > > A sad poem of an algorithm where solitude brought excessive use of cpu > cycles and memory allocation for redundant data (it copied over and over > again the same image till all memo

[PHP] Sad PHP Poem

2006-06-25 Thread Martin Alterisio
A sad poem of an algorithm where solitude brought excessive use of cpu cycles and memory allocation for redundant data (it copied over and over again the same image till all memory was filled with it) -- $timeWaiting = 0; while (!$you->near($me)) { $me->thinkAbout(

Re: [PHP] Get rid of line breaks

2006-06-18 Thread Martin Alterisio
2006/6/18, Peter Lauri <[EMAIL PROTECTED]>: Best group member, I have a variable $content that is taken from a database. It contains line breaks and the $content will be posted with line breaks. I need to use this to insert this into a JavaScript function: $output = 'writeRichText(\'rte

Re: [PHP] How to run one php app from another? RECAP

2006-06-16 Thread Martin Alterisio
2006/6/16, tedd <[EMAIL PROTECTED]>: Hi gang: So, there is NOT a way for one running php-application to call another and have it run while having the parent quit? For example, program "a" runs and presents the user with a web page. The user responds in some fashion (i.e., enters text) and clic

Re: [PHP] progress monitor in php

2006-06-15 Thread Martin Alterisio
2006/6/15, weetat <[EMAIL PROTECTED]>: Hi all , I was using PEAR:HTTP_Upload to upload file in php 4.3.2. Is ok , however i need to display some sort of progress monitor to the user because some file is very large and took some times to upload. I need to inform the users to uploading is i

Re: [PHP] mysql + PHP

2006-06-15 Thread Martin Alterisio
2006/6/15, weetat <[EMAIL PROTECTED]>: Hi all, I have SQL query , for example , Select country , name from tbl_chassis order by country. The problem of the sql statement is that , if there are empty value in country field , it be sorted first . How to do sorting the empty value last ? I

Re: [PHP] Skip first 4 array values

2006-06-09 Thread Martin Alterisio
2006/6/9, Jonas Rosling <[EMAIL PROTECTED]>: Is there any way you can skip for example the first 4 array values/posisions in an array no matter how many values it contains? Thanks // Jonas -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] generating/transforming HTML so that it 'works' in a flash file

2006-06-07 Thread Martin Alterisio
2006/6/7, Jochem Maas <[EMAIL PROTECTED]>: hi people, I've been STFW till I'm blue in the face (so lack of oxygen might be problem atm) but can't find any [decent] info on generating/transforming existing HTML so thats it's compatible with the subset of tags that are supported by Flash (apparen

Re: [PHP] When is "z" != "z" ?

2006-06-06 Thread Martin Alterisio
2006/6/6, Robert Cummings <[EMAIL PROTECTED]>: On Tue, 2006-06-06 at 14:31, Martin Alterisio wrote: > 2006/6/6, Robert Cummings <[EMAIL PROTECTED]>: > > > > On Tue, 2006-06-06 at 14:06, Martin Alterisio wrote: > > > 2006/6/6, Robert Cummings <[EMAIL PR

Re: [PHP] When is "z" != "z" ?

2006-06-06 Thread Martin Alterisio
2006/6/6, Robert Cummings <[EMAIL PROTECTED]>: On Tue, 2006-06-06 at 14:06, Martin Alterisio wrote: > 2006/6/6, Robert Cummings <[EMAIL PROTECTED]>: > > > > > > You must have missed this post: > > > > > > > > http://m

Re: [PHP] When is "z" != "z" ?

2006-06-06 Thread Martin Alterisio
2006/6/6, tedd <[EMAIL PROTECTED]>: If php is supposed to be open source, doesn't that mean that people can voice their opinion on what they observe and expect? I second that. I believe being open-source doesn't mean "Yay, it's free!" but "Cool, someone is listening to us!"

Re: [PHP] When is "z" != "z" ?

2006-06-06 Thread Martin Alterisio
2006/6/6, Robert Cummings <[EMAIL PROTECTED]>: On Tue, 2006-06-06 at 13:11, Martin Alterisio wrote: > 2006/6/6, Robert Cummings <[EMAIL PROTECTED]>: > > > > On Tue, 2006-06-06 at 09:46, Martin Alterisio wrote: > > > 2006/6/6, Robert Cummings <[EMAIL PR

Re: [PHP] When is "z" != "z" ?

2006-06-06 Thread Martin Alterisio
2006/6/6, Robert Cummings <[EMAIL PROTECTED]>: On Tue, 2006-06-06 at 09:46, Martin Alterisio wrote: > 2006/6/6, Robert Cummings <[EMAIL PROTECTED]>: > > > In C++ they do leave it to the coder, and well, we all know what a mess > > it can be deciphering overloaded

Re: [PHP] When is "z" != "z" ?

2006-06-06 Thread Martin Alterisio
2006/6/6, Rasmus Lerdorf <[EMAIL PROTECTED]>: Martin Alterisio wrote: > You're right about ++ operator not to be considered a math operator, my > mistake. What I should have said is that the usual connotation and expected > behaviour of ++ and the comparison operators

Re: [PHP] When is "z" != "z" ?

2006-06-06 Thread Martin Alterisio
2006/6/6, Barry <[EMAIL PROTECTED]>: Martin Alterisio schrieb: > is it really worthy the functionality supplied with the string ++ operator > as it is? I don't see its usefullness yet. guess you want to order something by "name" not by number which might be false

Re: [PHP] When is "z" != "z" ?

2006-06-06 Thread Martin Alterisio
2006/6/6, Robert Cummings <[EMAIL PROTECTED]>: On Tue, 2006-06-06 at 00:01, Martin Alterisio wrote: > > Because defining ++ and < and > in such a way as to make them "behave like > > numbers" would have made them not work for alphabetizing. A string is a >

Re: [PHP] When is "z" != "z" ?

2006-06-05 Thread Martin Alterisio
2006/6/6, Larry Garfield <[EMAIL PROTECTED]>: On Monday 05 June 2006 21:12, Martin Alterisio wrote: > > As for the increment, it actually would never have occurred to me to ++ a > > string before this thread, honestly. :-) However, what it appears to be > > doing (

Re: [PHP] When is "z" != "z" ?

2006-06-05 Thread Martin Alterisio
2006/6/5, Larry Garfield <[EMAIL PROTECTED]>: On Monday 05 June 2006 14:56, Martin Alterisio wrote: > 2006/6/5, [EMAIL PROTECTED] <[EMAIL PROTECTED]>: > > This is just one of those cases where the designers had to make a > > judgement call on how things were going to

Re: [PHP] When is "z" != "z" ?

2006-06-05 Thread Martin Alterisio
2006/6/5, [EMAIL PROTECTED] <[EMAIL PROTECTED]>: This is just one of those cases where the designers had to make a judgement call on how things were going to operate. It makes sense if you look at the two things separately (incrementing vs string 'greatness' evaluation) and makes sense that how

Re: [PHP] When is "z" != "z" ?

2006-06-04 Thread Martin Alterisio
2006/6/4, Rasmus Lerdorf <[EMAIL PROTECTED]>: Martin Alterisio wrote: > Still: > anything < ++anything > should be true, or at least that's what they taught me on abstract data > types design, and I think they're right (at least this time) In loosely typed la

Re: [PHP] When is "z" != "z" ?

2006-06-04 Thread Martin Alterisio
2006/6/4, Rasmus Lerdorf <[EMAIL PROTECTED]>: Martin Alterisio wrote: > 2006/6/4, Rasmus Lerdorf <[EMAIL PROTECTED]>: >> >> tedd wrote: >> > Hi gang: >> > >> > Here's your opportunity to pound me again for not knowing the basics of >

Re: [PHP] When is "z" != "z" ?

2006-06-04 Thread Martin Alterisio
2006/6/4, Rasmus Lerdorf <[EMAIL PROTECTED]>: tedd wrote: > Hi gang: > > Here's your opportunity to pound me again for not knowing the basics of php. > > I vaguely remember something like this being discussed a while back, but can't find the reference. > > In any event, if one uses -- > > for ($

Re: [PHP] How do I make a HTML tree for a set of nodes?

2006-06-04 Thread Martin Alterisio
2006/6/4, Niels <[EMAIL PROTECTED]>: Hi! On Sunday 04 June 2006 18:13, Martin Alterisio wrote: [snip] > I had a similar problem that, although it was with a binary tree, it can > be used with your tree. PHP doesn't like too much the use of recursion, > but this time recurs

Re: [PHP] How do I make a HTML tree for a set of nodes?

2006-06-04 Thread Martin Alterisio
2006/6/4, Niels <[EMAIL PROTECTED]>: Hi, I have a set of nodes. Each node has a parent and so the set can be thought of as a tree. I want to show that tree somehow on a webpage, served by PHP. I cannot use Dot/Graphwiz for various reasons. What I'm looking for is an output of DIVs or tablecell

Re: [PHP] Help with enter key in Forms

2006-06-02 Thread Martin Alterisio
2006/6/2, George Babichev <[EMAIL PROTECTED]>: Awesome, thank you so much! It works! On 6/1/06, Chris <[EMAIL PROTECTED]> wrote: > > George Babichev wrote: > > Ok, I sent it to everyone and you. Now can you answer my question > please? > > I type in > > 1 > > > > > > > > 2 > > into my form in t

Re: [PHP] Using 'header' as redirect

2006-05-30 Thread Martin Alterisio
2006/5/30, Philip Thompson <[EMAIL PROTECTED]>: Are you checking what the user is sending inside $_GET['page']? If not, your system is vulnerable to a remote file injection.

Re: [PHP] Including Functions; one file or many?

2006-05-27 Thread Martin Alterisio
2006/5/27, Jochem Maas <[EMAIL PROTECTED]>: 2. any include file that does contain code that runs on inclusion contains something like the following as the first line of code: if (!defined('MY_APP_IS_SETUP')) die('try http://'.$SERVER['SERVER_NAME'].'/'); An enhancement to this strategy could

Re: [PHP] Re: Can php convert doc to HTML?

2006-05-23 Thread Martin Alterisio
2006/5/23, Jochem Maas <[EMAIL PROTECTED]>: my 2cents Martin Alterisio wrote: > 2006/5/23, Dotan Cohen <[EMAIL PROTECTED]>: > >> >> On 5/23/06, Martin Alterisio <[EMAIL PROTECTED]> wrote: >> > >> > If that's the case, why don'

Re: [PHP] Re: Can php convert doc to HTML?

2006-05-23 Thread Martin Alterisio
2006/5/23, Dotan Cohen <[EMAIL PROTECTED]>: On 5/23/06, Martin Alterisio <[EMAIL PROTECTED]> wrote: > > If that's the case, why don't you just use the "export as web page" or "save > as web page" tools of MS Word (if you don't have it a

Re: [PHP] Re: Can php convert doc to HTML?

2006-05-23 Thread Martin Alterisio
2006/5/23, Dotan Cohen <[EMAIL PROTECTED]>: On 5/23/06, tedd <[EMAIL PROTECTED]> wrote: > At 7:09 PM +0300 5/23/06, Dotan Cohen wrote: > >This may be far-fetched, but can php convert a doc file to HTML? I > >vaguely remember a thread that discussed converting pdf's, but I > >cannot find referenc

Re: [PHP] PHP Notice: Undefined index

2006-05-19 Thread Martin Alterisio
2006/5/19, John Taylor-Johnston <[EMAIL PROTECTED] : Any idea why this bit of code if("yes" == $_POST['submitter']) { mysql_select_db($db,$myconnection); $sql = "INSERT INTO `$db`.`$table` (name,email,comments,entrydate) values ('$name','$email','$comments','$entrydate')"; mysq

Re: [PHP] Converting characters

2006-05-17 Thread Martin Alterisio
2006/5/17, Jonas Rosling <[EMAIL PROTECTED]>: Hi, the PHP newbie is here again asking questions. Is there anyway in PHP to convert none international characters so the are displayed correct? In my case I have lots of data in the database with å,ä and ö. Thanks // Jonas -- PHP General Mailing L

Re: [PHP] Handling Large Check Box Data

2006-05-17 Thread Martin Alterisio
2006/5/17, Rahul S. Johari <[EMAIL PROTECTED]>: Ave, I¹m a little confused as to what¹s the best way to handle this. I have a form which, apart from lots of other fields, has a set of 25 ­ 30 Check Boxes, each of which asks the user for some kind of information which the user can check or leave

  1   2   >