Brainwashing, level 2

From: Date: Wed, 22 Nov 2000 01:06:30 +0000
Subject: Brainwashing, level 2
References: 1 2 3  Groups: php.general 
Request: Send a blank email to php-general+get-26553@lists.php.net to get a copy of this message
At 01:25 22/11/00 +0100, you wrote:
Christian Dechery ... ok... got it! You know what my real problem is? Addiction to C and it's nasty thousands of lines to do something simple. I suggest you a total brain-washing. Think for a moment in Visual C and visual Basic... How many lines of code do you need in VisualBasic to pop a error dialog? How many with VisualC? And remember, that damned website needs to be completely done by thursday... Like, I didn't get REALLY what that command array() is for. What can u do with it? Create and fill up a hash table? With what? For example, $friend[name]="john"; $friend[email]="john@domain.com"; does just the same as $friend=array( name => "john", email => "john@domain.com"); I consider easier the first way, but i wonder if the array() function is faster to be executed. Anyway, how cares how many CPU is wasted in that 1.1 Ghz webserver??
Yeah... that I got the first time I saw one example....
for instance (I know I'm being a pain in the ass, just tell me when to stop and I will)... I created in pure C a pseudo-e-commerce system for my website. Since we don't have databases (lack of cash) *ehem* Did you know that MySQL, a database format that PHP can deals very well with, is TOTALLY FREE??
I already installed MySQL here, and started playing with some queries... it works fine...
I did it all with binary files. It works fine... perfect. Until your binary file grows up to several megabytes, and loading a page can spend 20 or 30 secs...
believe, that won't happen... but that's not the point!
And I have a logfile so I can create stats. It is in the format: product_id|product_name|time|boolean type(can be 1 or 0, 1 for click, 0 for view) ok? and I had to make a nice and cool log analyzer for the "clients" so they can view how their products are going. So I went there created structs, lists and tables in memory to store all the shit I needed and then put it out on nice and kewl templates... and I have NO idea how to build lists and tables on PHP... this array stuff isn't really giving me what I need. Or it does, but I can't see it. All the examples I've seen tells me nothing. What do you need? Show all the data in a array?? echo "<TABLE><TR><TD><B>Name</B></TD><TD><B>E-mail</B></TD></TR>"; while (list($name,$email)=each($friends))
    {
    echo "<TR><TD>$name</TD>";
    echo "<TD>$email</TD></TR>";
    }
echo "</TABLE>";
yeah... kinda obvious, but how do I get the data in the array? that's my question... not how I show it... how do I feed the array? This thing of not having to declare just makes me nuts...
and that is a low-to-medium complexity code, so I tought, if I could get that "translated" to PHP, than I'd undestand those DAMNED arrays... you know? I'm a pointer freak. Aaaarrrgghh!!! Stay away from me, you hellish creature!! I don't see three or four varibles coming from one function without pointers. Hahaha!! You'll get amazed when you see what the include() function does in PHP, believe me... You'll never though about functions returning several values through pointers... you'll think about subprograms copy-pasted into the main program that modify the values of the variables...
what???????????
Subject: Christian Dechery Brainwashing status: Starting... sorry once again... I don't know anyone who programs in PHP, they all say: "PHP? Humpf... ASP rules.", and getting started from a manual isn't easy at all. Well, they'll be that guys that program under micro$oft... get a person that programs PHP under unix, they all hate ASP!
I hate ASP! And I don't even program in PHP... (not yet)... I really need to be brainwashed... I once was, when I started to learn OO in college... but I didn't like it all. And erased it all from my pointer head. :) ____________________________ . Christian Dechery (lemming) . http://www.tanamesa.com.br . Gaita-L Owner / Web Developer

« previous php.general (#26553) next »