You are here: Re: Confused by mysqli « PHP Programming Language « IT news, forums, messages
Re: Confused by mysqli

Posted by Jerry Stuckle on 07/05/06 11:57

Dodger wrote:
>
>
> Oh, yeah, I know... I was more coming from the angle of 'Perl can keep
> it pretty too, but 98% of perl programmers don't and I don't know why
> -- just cause it's one of the things I hear all the time as a complaint
> about Perl CGIs... and if you grab scripts off the web, it's true --
> but those are usually worth every penny, minus the bandwidth cost, IMO.
>
> Actually I think it's because all the die-hard PHP fans I know have
> used the argument once or twice, and so coming into a PHP group I
> wanted to point out that I want to be able to do a lot of the stuff I
> do in Perl in PHP also, not because I feel a *need* to, but because I
> *want* to -- which I hope might garner more respect. But it's
> ecumenicism, not conversion.
>

But Perl and PHP are two different languages, which at times approach a
solution in two different ways. And other languages will approach the
problem in still other ways.

If PHP and Perl always approached a solution in the same way, why have
two languages?

> But yeah, I know the whole
>
> <?php
> $var = 'foo';
> ?>
> <p class="blue"><?= $var ?> bar..<br>
> for you.</p>
>
> thing... got that out of the box... plus I used to do ColdFusion, which
> is a lot the same, and I have dorked around with embedded Perl script
> in mod_perl, as SHTML tags, or embperl or even, once, PerlAsp (yuk).
>
> Its just I see people do comparisons a lot and they try and compare
> that to this Perl code:
> my $var = 'foo';
> print "<class=\"blue\">$var bar..<br>\nfor you</p>\n";
>
> and it's just totally the wrong thing people compare with.
> The proper thing to make such a comparison would in my case be:
>
> my $var = 'foo';
> print <<"EOF";
> <p class="blue">$var bar..<br>
> for you.</p>
> EOF
>
> See, Pretty Perl. Only thing missing is the vim syntax highlighting on
> the HTML bits. But you can't have everything, neh? B^)
>
> (
> And I prefer the heredocs vastly to the CGI faux-oo approach thing some
> people try and push, which is horrible stuff, like:
> my $var = 'foo';
> print $cgi->p("$var bar", $cgi->br(), "for you.", {class => 'blue'});
>
> That stuff is only useful, IMO, for, like, the popup_menu method and
> stuff where just writing out the HTML is a pain.
> )
>
> Buy yeah, I want to know how to do this every way, and I figure
> branching out to PHP was one of the best starts.
>

If you want to learn another language, I would also suggest you learn
how the other language does things. Don't try to force the language
you're learning into the method you're used to.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация