f



php condition in a tabel with html and php

Hello,

I would like to show a line in a tabel in html if there is quantity of
article choosed.

My code is:

<? if ($quantite1 > 0) {
echo('
<tr>
<td align="left" nowrap="nowrap">Article 1</td>
<td align="center"><? echo $quantite1 ?> </td>
<td align="center">20 &euro;</td>
<td align="center"> <? echo $montant1 ?> &euro;</td>
</tr>');
}
 else{
echo("");
}
?>

If there is no article >> no line
If there is  article >> show the line

Problem: I can have the variable $quantite1 and $montant1 en php

0
joseph267 (17)
10/9/2006 8:55:44 AM
comp.lang.php 32646 articles. 0 followers. Post Follow

9 Replies
1306 Views

Similar Articles

[PageSpeed] 16

In article <1160384144.408791.288410@m73g2000cwd.googlegroups.com>,
 "elia" <joseph@pcl.ch> wrote:

> Hello,
> 
> I would like to show a line in a tabel in html if there is quantity of
> article choosed.
> 
> My code is:
> 
> <? if ($quantite1 > 0) {
> echo('
> <tr>
> <td align="left" nowrap="nowrap">Article 1</td>
> <td align="center"><? echo $quantite1 ?> </td>
> <td align="center">20 &euro;</td>
> <td align="center"> <? echo $montant1 ?> &euro;</td>
> </tr>');
> }
>  else{
> echo("");
> }
> ?>
> 
> If there is no article >> no line
> If there is  article >> show the line
> 
> Problem: I can have the variable $quantite1 and $montant1 en php

You can't break into php code inside a echo.

Try:

echo "<td> $montant1 </td>";

And not:

echo('<td> <? echo $montant1 ?> </td>');
     ^     ^
     1     2


1. Using ' means that variables won't be parsed, but printed.
2. <? ... ?> is for the parsing engine, not to be used within PHP code.

-- 
Sandman[.net]
0
mr249 (22318)
10/9/2006 9:05:48 AM
Thanks, but so it's my problem! If I write ...

<? if ($quantite1 > 0) {
echo('
<tr>
<td article1 </td>
<td $quantite1</td>
<td 20 &euro;</td>
<td $montant1 &euro;</td>
</tr>');
}
else{
echo("");
}
?>

...."$quantite1" and "$montant1" is not take as variable php.
Until "4" ou "7" or "10" it's write "$quantite1"
Pascal

0
joseph267 (17)
10/9/2006 9:23:46 AM
Following on from elia's message. . .
>Hello,
>
>I would like to show a line in a tabel in html if there is quantity of
>article choosed.
>
>My code is:
broken.


* use _double_ quotes to get $-variables rendered.
* to escape double quotes use \"
* nowrap html syntax!
* print() is same as echo()
* Euro combined with montant
* I've modified your table format to remove redundant and space 
consuming bits.


// print column headings before loop
print("<tr><th>Article</th><th>Montant</th></tr>\n");


// inside the loop
if ($quantite1 > 0) {     // ignore if no quantity
   // tidy up montant for pretty printing
   if(!$montant==0){  // assuming $montant is numeric
     $m = sprintf('&euro; %6.2f",$montant);  // to nice currency string
   }else{
     $m='';
   }
   print("<tr>
<td align=\"center\">$quantite1</td>
<td align=\"right\">$m</td>
</tr>");
}


-- 
PETER FOX Not the same since the e-commerce business came to a .
peterfox@eminent.demon.co.uk.not.this.bit.no.html
2 Tees Close, Witham, Essex.
Gravity beer in Essex  <http://www.eminent.demon.co.uk>
0
peterfox (209)
10/9/2006 9:44:40 AM
In article <1160385826.277060.94330@c28g2000cwb.googlegroups.com>,
 "elia" <joseph@pcl.ch> wrote:

> Thanks, but so it's my problem! If I write ...
> 
> <? if ($quantite1 > 0) {
> echo('
> <tr>
> <td article1 </td>
> <td $quantite1</td>
> <td 20 &euro;</td>
> <td $montant1 &euro;</td>
> </tr>');
> }
> else{
> echo("");
> }
> ?>
> 
> ..."$quantite1" and "$montant1" is not take as variable php.
> Until "4" ou "7" or "10" it's write "$quantite1"
> Pascal

Read my reply again. If you use

    echo('$foobar');

it till print a dollar sign and then foobar. If you use

    echo("$foobar");

it will print the content of the variable $foobar. Not the difference.


-- 
Sandman[.net]
0
mr249 (22318)
10/9/2006 11:12:50 AM
elia wrote:
> I would like to show a line in a tabel in html if there is quantity of
> article choosed.
>
> My code is:

    <? if ($quantite1 > 0) {
      echo <<<LINE
      <tr>
      <td align="left" nowrap="nowrap">Article 1</td>
      <td align="center">$quantite1</td>
      <td align="center">20 &euro;</td>
      <td align="center">$montant1 &euro;</td>
      </tr>
    LINE;
    //}
    //else{
    //echo("");
    }
    ?>

-- 
File not found: (R)esume, (R)etry, (R)erun, (R)eturn, (R)eboot
0
hexkid (576)
10/9/2006 11:17:02 AM
Thanks but it doesn't work! Pascal

0
joseph267 (17)
10/9/2006 11:36:09 AM
elia wrote:
> Thanks but it doesn't work! Pascal

Why? What happens? What did you expect? *How* does it not work?
See http://www.php.net/string

    <?php
    error_reporting(E_ALL);
    ini_set('display_errors', '1');

    $quantite1 = 6;
    $montant1 = 42;

    ### Method 1: double quote delimited string with embedded double quotes
    if ($quantite1 > 0) {
      echo "<tr>
    <td align=\"left\" nowrap=\"nowrap\">Article 1</td>
    <td align=\"center\">$quantite1</td>
    <td align=\"center\">20 &euro;</td>
    <td align=\"center\">$montant1 &euro;</td>
    </tr>";
    }

    ### Method 1: double quote delimited string with embedded single quotes
    if ($quantite1 > 0) {
      echo "<tr>
    <td align='left' nowrap='nowrap'>Article 1</td>
    <td align='center'>$quantite1</td>
    <td align='center'>20 &euro;</td>
    <td align='center'>$montant1 &euro;</td>
    </tr>";
    }

    ### Method 3: single quote delimited string with embedded double quotes
    if ($quantite1 > 0) {
      echo '<tr>
    <td align="left" nowrap="nowrap">Article 1</td>
    <td align="center">', $quantite1, '</td>
    <td align="center">20 &euro;</td>
    <td align="center">', $montant1, ' &euro;</td>
    </tr>';
    }

    ### Method 4: heredoc syntax with embedded double quotes
    if ($quantite1 > 0) {
      echo <<<LINE
    <tr>
    <td align="left" nowrap="nowrap">Article 1</td>
    <td align="center">$quantite1</td>
    <td align="center">20 &euro;</td>
    <td align="center">$montant1 &euro;</td>
    </tr>
    LINE;
    }
    ?>

-- 
File not found: (R)esume, (R)etry, (R)erun, (R)eturn, (R)eboot
0
hexkid (576)
10/9/2006 1:17:03 PM
elia wrote:
> Hello,
> 
> I would like to show a line in a tabel in html if there is quantity of
> article choosed.
> 
> My code is:
> 
> <? if ($quantite1 > 0) {
> echo('
> <tr>
> <td align="left" nowrap="nowrap">Article 1</td>
> <td align="center"><? echo $quantite1 ?> </td>
> <td align="center">20 &euro;</td>
> <td align="center"> <? echo $montant1 ?> &euro;</td>
> </tr>');
> }
>  else{
> echo("");
> }
> ?>
> 
> If there is no article >> no line
> If there is  article >> show the line
> 
> Problem: I can have the variable $quantite1 and $montant1 en php
> 

Two options:

<? if ($quantite1 > 0) {
echo('
<tr>
<td align="left" nowrap="nowrap">Article 1</td>
<td align="center">' .$ quantite1 . '</td>
<td align="center">20 &euro;</td>
<td align="center">' . $montant1 . ' &euro;</td>
</tr>');
}
  else{
echo("");
}
?>

Or

<? if ($quantite1 > 0) {
echo("
<tr>
<td align=\"left\" nowrap=\"nowrap\">Article 1</td>
<td align=\"center\">$quantite1</td>
<td align=\"center\">20 &euro;</td>
<td align=\"center\">$montant1 &euro;</td>
</tr>');
}
  else{
echo("");
}
?>

-- 
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================
0
jstucklex (14659)
10/9/2006 1:17:37 PM
Fantastic!! It's works with the first solution. ' . $quantite1 . '
marvelous, thanks to you!! Pascal

0
joseph267 (17)
10/9/2006 1:58:13 PM
Reply:

Similar Artilces:

PHP Training Institute In Delhi, Live Projects on PHP. Short Term PHP Courses, PHP Scripts, PHP Training with Live Projects.
Vserve Global offers short term PHP: Hypertext Preprocessor Training Course, which is a widely used, general-purpose scripting language that was originally designed for web development, to produce dynamic web pages. It can be embedded into HTML and generally runs on a web server, which needs to be configured to process PHP code and create web page content from it. It can be deployed on most web servers and on almost every operating system and platform free of charge.PHP is installed on over 20 million websites and 1 million web servers. TOPICS:- >> Core PHP Language >> HTML, Cascad...

PHP within PHP...
I took over the support of a website that is set up something like this inside one of the pages: include_once("header.php"); <?php //to get the content of the page they do this: $content = mysql_query("select content etc...); echo $content; ?> include_once("footer.php"); I am having problems evaluating any php that is used in the mysql content. Is there a way to get the mysql withing the mysql to run? Thank you for your time, Mandragon On Sep 17, 12:56 pm, Mandrago...@gmail.com wrote: > I took over the support of a website that is set up something like > this inside one of the pages: > > include_once("header.php"); > > <?php > //to get the content of the page they do this: > $content = mysql_query("select content etc...); > > echo $content; > ?> > > include_once("footer.php"); > > I am having problems evaluating any php that is used in the mysql > content. Is there a way to get the mysql withing the mysql to run? > > Thank you for your time, > > Mandragon Sorry, The question should read: "Is there a way to get the php withing the echo $htmlcontent to run?" Of course you are, $content is a resource. The MySQL Query resource. try this: $content = mysql_query('bla bla bla'); while ($row = mysql_fetch_assoc($content)) { $result[] = $row; } $content = $result; Now you can use $content ;). In answer to your edit... eval($co...

html within php works, but php within html doesnt
Below are two different ways of writing the same script. The top one works but the bottom one displays nothing in the list. Can anyone see why? <?php echo "<select name='subcat' style='WIDTH: 95%'><option value=''>Select one</option>"; while($noticia = mysql_fetch_array($quer)) { echo "<option value='$noticia[TopicID]'>$noticia[Topic]</option>"; } echo "</select>"; ?> <select name="subcat" style="WIDTH: 95%"> <option value="">Select one</option> <?php while($noticia = mysql_fetch_array($quer)) { ?> <option value="<?php $noticia[TopicID]; ?>"><?php $noticia[Topic]; ?></option> <?php } ?> </select> Ian On Sat, 02 Sep 2006 13:19:38 GMT, "mantrid" <ian.dandav@virgin.net> wrote: ><option value="<?php $noticia[TopicID]; ?>"><?php $noticia[Topic]; >?></option> You haven't done anything in those PHP blocks; you need "print" or "echo". -- Andy Hassall :: andy@andyh.co.uk :: http://www.andyh.co.uk http://www.andyhsoftware.co.uk/space :: disk and FTP usage analysis tool DOOH! Knew it was somethin simple Cheers "Andy Hassall" <andy@andyh.co.uk> wrote in message news:gh1jf2dur1knluu2uf2mqj8r8shgu778ne@4ax.com... > On Sat, 02 Sep 2006 13:19:38 GMT, "mantrid" <ian....

php outside php (?)
Sounds weird, i know. What i want/wonder is the following: PHP can do the next: <?php if($foo == 'bar') { ?> Ow yeah, foo is bar! <?php }; ?> But how can i do the following: <?php $foo= ?> this is what foo looks like. <?php }; ?> This way i could edit the content of $foo in DW's design-view. I hope it's clear enough for you all to understand... Greetings frizzle. frizzle wrote: > But how can i do the following: > > <?php > > $foo= > > ?> > this is what foo looks like. > <?php > > }; > > ?> > > This way i could edit the content of $foo in DW's design-view. > I hope it's clear enough for you all to understand... <?php ob_start(); ?> this is what foo looks like. <?php $foo=ob_get_clean(); ?> -- Justin Koivisto - justin@koivi.com http://koivi.com Wow, little late on the reply, but i still wanted to thank you for your help. This is exactly what i meant, and it works great! :D Thanks again. ...

php to php obj
Hi All, Is there any tool to convert the .php files into its object files in deploying the files to other's server like java classes are deployed? Thanks in advance --AR John7481 <arjohn7481@hotmail.com> wrote or quoted: > Is there any tool to convert the .php files into its object files in > deploying the files to other's server like java classes are deployed? To what end? Do you want a PHP obfuscator? They tend not to be needed - since the code remains on the server. Do you want a PHP squeezer? Again - since PHP remains on the server that is of reduced importance. PHP obfuscators and squeezers are out there - but what exactly are you looking for? -- __________ |im |yler http://timtyler.org/ tim@tt1lock.org Remove lock to reply. With total disregard for any kind of safety measures Tim Tyler <tim@tt1lock.org> leapt forth and uttered: > John7481 <arjohn7481@hotmail.com> wrote or quoted: > >> Is there any tool to convert the .php files into its object >> files in deploying the files to other's server like java >> classes are deployed? > > To what end? > > Do you want a PHP obfuscator? They tend not to be needed - > since the code remains on the server. > > Do you want a PHP squeezer? Again - since PHP remains on the > server that is of reduced importance. > > PHP obfuscators and squeezers are out there - but what exactly > are you looking for? I think he'...

Best PHP Training | PHP Development Training | PHP Training Institute
Tops Technologies provides php and mysql certification courses in ahmedabad, baroda, surat, Rajkot, Udaipur, Gujarat, india.PHP Training with MySQL is an introductory course in the PHP and MySQL technology. Mysql and php training course, php for beginners, sql training courses, PHP Training courses, php courses, mysql training courses, php mysql course. For More Details :- http://www.tops-int.com ...

die() php but continuing on to html below the end php tag?
Hi, Is there a php function that will stop executing the php code, but do any necessary clean-up, like die(), and will then go on to process any html in the file that is below the '?>' end php tag? Both die() and exit() exit without processing the html after the end php tag. E.G. SOME HTML... <?php SOME PHP... Call End PHP processing function (jumps to end the page neatly html). ?> END PAGE NEATLY HTML... Or must I place the end page html in a php function and call that, say, as part of a MyDie() function. Thanks. On 13 Nov, 16:50, MS <No.Way.J...@No.Spam.Thank.You.com> wrote: > Hi, > > Is there a php function that will stop executing the php code, but do any > necessary clean-up, like die(), and will then go on to process any html in > the file that is below the '?>' end php tag? Both die() and exit() exit > without processing the html after the end php tag. > > E.G. > > SOME HTML... > > <?php > > SOME PHP... > > Call End PHP processing function (jumps to end the page neatly html). > > ?> > > END PAGE NEATLY HTML... > > Or must I place the end page html in a php function and call that, say, as > part of a MyDie() function. > > Thanks. <?php SOME PHP... die('END PAGE NEATLY HTML...'); ?> Captain Paralytic emailed this: > On 13 Nov, 16:50, MS <No.Way.J...@No.Spam.Thank.You.com> wrote: >> Hi, >> >>...

Dynamically saving HTML containing PHP variables through PHP
I have an HTML page with references to PHP variables. This HTML is included from another PHP page. How can I save the HTML page dynamically i.e. when all the PHP variables are written into the HTML page. Thanx in Advance Mitesh wrote: > I have an HTML page with references to PHP variables. This HTML is > included from another PHP page. How can I save the HTML page > dynamically i.e. when all the PHP variables are written into the HTML > page. > > Thanx in Advance Hi, Probably the easiest way: When creating the file that contains the values of PHP: 1) start outputbuffering above your page: ob_start() 2) Just output all you want, using your PHP variables to produce the output 3) At the end of the script, get the content of the buffer, and write that to the file you want to include elsewhere. If you have to do this for many pages (eg: all is dynamic), and have to automate the process: have a look at CURL. Curl can call another PHP script with POST or GET parameters given by you (eg the filename, other vars that are used to produce the output, etc) Hope that helps Regards, Erwin Moller "Mitesh" <oopsbabies@hotmail.com> kirjoitti viestiss�:1170926634.468367.313320@a34g2000cwb.googlegroups.com... >I have an HTML page with references to PHP variables. This HTML is > included from another PHP page. How can I save the HTML page > dynamically i.e. when all the PHP variables are written into the HTML > page. Do You mean th...

php://memory and php://temp
http://php.net/manual/en/wrappers.php.php per the documentation: php://memory and php://temp are both listed under "Allows Appending" what am I missing / what's the point? They only seem to work with read/write modes such as fopen('php://memory','rw'); closing the handle, or trying to open another handle without closing the first essentially erase the contents... so what's the point of fopen('php://memory','a') ? you'll a) be appending nothing, b) no way to read what you just wrote? sure would be nice if you could $fh = fopen('php://memory', 'w'); fwrite($fh, 'test string'); fclose($fh); $fh = fopen('php://memory', 'r'); $result = fgets($fh,2048); fclose($fh); echo $result; On 10/12/2010 9:44 PM, BKDotCom wrote: > http://php.net/manual/en/wrappers.php.php > per the documentation: php://memory and php://temp are both listed > under "Allows Appending" > > what am I missing / what's the point? > > They only seem to work with read/write modes such as > fopen('php://memory','rw'); > > closing the handle, or trying to open another handle without closing > the first essentially erase the contents... so what's the point of > fopen('php://memory','a') ? > you'll > a) be appending nothing, > b) no way to read what you just wrote? > > sure would be nice if you could > > $fh = ...

PHP does not parse .PHP files
I have this problem with PHP that someone might be able to help. With CLI, I am able to execute my .php files. For example, if I type "php phpinfo.php" , this works fine on my system. If I put the phpinfo.php file is in /var/www/html and I try to access it through the browser, I get the content of the file and not the execution of the file. Instead of display the info of PHP, I got the text of the file as: <?php phpinfo(); ?> Why? Thanks Phong Ho wrote: >I have this problem with PHP that someone might be able to help. > >With CLI, I am able to execute my ....

Send array from php to php
HI every one I' try to send array from web page to php file but no data are show I'm using session to store data and this is my code //////////////////////////////////////////////////////////////////////// $data = $cart_items; session_register('data'); foreach ($cart_items as $cart_item) { echo "<tr>"; echo " <td><span class='style2'>".$cart_item->name."</span></td>"; echo " <td><span class='style2'>".$cart_item->description."</ span></td>"; echo " <td><span class='style2'>".$cart_item->price." S.R.</span></ td>"; echo " <td><span class='style2'>".$cart_item->quantity."</span></ td>"; echo " <td><span class='style2'>".$cart_item->price * $cart_item- >quantity."</span></td>"; echo " <td><span class='style4'><a href='order.php?action=del&id=". $cart_item->object_id."'>[del]</a></span></td>"; echo "</tr>"; \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ \ and this is my php code to get the data //////////////////////////////////////////////////////// <?php foreach ($data as $item) { echo "<tr>"; print " &l...

php notification through php sdk
Hi there I want to build a e-commerce website similar to wish.com and I have chosen opencast as my framework of choice. Now wish has a feature that when you save a product in wish and if you are logged in with Facebook or gmail all of your friends will get a notification that your friends has saved a item on wish. I want a similar feature on my site Now I know Facebook provide a sdk JavaScript and php and wish might be using something similar but I am using open cart can I open home page or product page in the sdk Thanks On 3/20/2015 7:30 AM, apoorv.kanungo@gmail.com wrote: &g...

PHP with Indian PHP Developers
Dear all, If you want to make a PHP web application, or need to <a href="http:// www.virtueinfo.com/php-developers/hire-php-programmers-developers-india.htm">Hire PHP Developer</a>contact a leading <a href="http://www.virtueinfo.com/ php-developers/php-web-development.htm"> PHP Web Development Compnay</ a> <a href="http://www.virtueinfo.com/php-developers/php-web-programming- php-developers-india.htm">Offshore PHP web development India</a> On Thu, 25 Feb 2010 01:37:02 -0800 (PST), Virtue Info wrote: > Dear all, > > > If you want to make a PHP web application, or need to <a href="http:// > www.example.com/php-developers/hire-php-programmers-developers-india.htm">Hire > PHP Developer</a>contact a leading <a href="http://www.example.com/ > php-developers/php-web-development.htm"> PHP Web Development Compnay</ > a> > > ><a href="http://www.example.com/php-developers/php-web-programming- > php-developers-india.htm">Offshore PHP web development India</a> > Third time's the charm? Not exactly a ringing endorsement of the skills you've got available or your testing method reliablity... -- 12. One of my advisors will be an average five-year-old child. Any flaws in my plan that he is able to spot will be corrected before implementation. --Peter Anspach's list of things to do as an ...

Php constants in php.ini
I am trying to set user_agent = PHP_VERSION in php.ini. In my php.ini the instructions say that you can use constants in the php.ini file. The only constants I can get to work, though, are the error level constants like E_ALL, E_ERROR, E_WARNING, etc., ... Is anyone aware of some sort of trick to getting others to work? (I was thinking it would be nice to have the user agent string used by my Php scripts to use PHP_VERSION in the string.) -- ***************************** Chuck Anderson • Boulder, CO http://www.CycleTourist.com Integrity is obvious. The lack of it is common. *****...

php requires ".php" not ".html" ?
Dumb question -- I know, but... Yes, I searched books and googled but couldn't find the answer. Does php always require that the page be .php and not .html ? Or is this server-dependent? Mine doesn't seem to recognize a php line in a .html page. By the way, how do searchers, eg Google, treat .php? same as .html? Do I lose search position by changing from .html to .php? MasonC masoncXXX@XXXfrontal-lobe.info wrote: > Dumb question -- I know, but... > Yes, I searched books and googled but couldn't find the answer. > > Does php always require that the page be .php and not .html ? > Or is this server-dependent? Mine doesn't seem to recognize a php line in a .html page. > > By the way, how do searchers, eg Google, treat .php? same as .html? > Do I lose search position by changing from .html to .php? > > MasonC It's part of your web server configuration - not PHP. Security conscious hosts will require .php extensions to parse php files. -- ================== Remove the "x" from my email address Jerry Stuckle JDS Computer Training Corp. jstucklex@attglobal.net ================== At Sun, 06 Jun 2010 14:49:27 -0700 masoncXXX@XXXfrontal-lobe.info wrote: > > Dumb question -- I know, but... > Yes, I searched books and googled but couldn't find the answer. > > Does php always require that the page be .php and not .html ? > Or is this server-dependent? Mine doesn't seem to r...

Validate your html forms with javascript and php with a simple php class
I found this article today, it shows how to valide your forms with both javascript and php by just using a php class http://www.codeassembly.com/Validate-your-html-forms-with-javascript-and-php-with-a-simple-php-class-that-generates-everything/ __ meinte: > I found this article today, it shows how to valide your forms with > both javascript and php by just using a php class > [snip] And your question is? Anyway, pretty bad code quality. Gregor -- http://www.gregorkofler.at ::: Landschafts- und Reisefotografie http://www.licht-blick.at ::: Forum f�r Multivisionsvortr�ge htt...

Does PHP need the .php extension ?
Hi guys, When I use PHP I give my file the .php extension. I always wondered if it could be an .htm page with a <script> block that the PHP resides in, the same way you would do JavaScript. If you can do it that way are there any benifits to that method ? Take care, Cyrus "Cyrus D." <satan@invalid.org> writes: > Hi guys, > > When I use PHP I give my file the .php extension. I always wondered if it > could be an .htm page with a <script> block that the PHP resides in, the > same way you would do JavaScript. If you can do it that way are the...

why does $_SERVER['PHP_SELF'] say /test.php/test.php for test.php?
I have a PHP script at 127.0.0.1/test.php. It's contents are as follows: <?php echo $_SERVER['PHP_SELF']; ?> And it's output isn't test.php, as I'd expect, or /test.php, but rather, /test.php/test.php. Why? And how do I fix it? El 06/10/2010 6:53, yawnmoth escribi�/wrote: > I have a PHP script at 127.0.0.1/test.php. It's contents are as > follows: > > <?php > echo $_SERVER['PHP_SELF']; > ?> > > And it's output isn't test.php, as I'd expect, or /test.php, but > rather, /test.php/test.php. Why? And how do I fix it? What output do you get if you change it to this? <?php echo '[' . $_SERVER['PHP_SELF'] . ']'; ?> What do your other $_SERVER values look like? <?php print_r($_SERVER); ?> -- -- http://alvaro.es - �lvaro G. Vicario - Burgos, Spain -- Mi sitio sobre programaci�n web: http://borrame.com -- Mi web de humor satinado: http://www.demogracia.com -- On 06/10/10 09:30, "�lvaro G. Vicario" wrote: > El 06/10/2010 6:53, yawnmoth escribi�/wrote: >> I have a PHP script at 127.0.0.1/test.php. It's contents are as >> follows: >> >> <?php >> echo $_SERVER['PHP_SELF']; >> ?> >> >> And it's output isn't test.php, as I'd expect, or /test.php, but >> rather, /test.php/test.php. Why? And how do I fix it? > > What output do you get if you change it ...

Embed lots of html code in php & construc objects in php
Hi folks, I have a php file, it contains just a few php codes. The php codes I need to use is to construct an object, and use it several times, from html head until the last line of html code. I know I can construct the same object (I am using php5) several times, something like $object = new $class, and use several <?php $object->functionX ?> ... <?php $object->functionZ ?> to include php code in html code. However, to construct this object I have to call a remote server, and rely on its response, which is a bit slow. To construct it several times takes even more time, and I do not like that. So my questions are : 1) How can I embed a big chunk of html code in php without using something like echo "<a href=\"aaa.html\">" all the time 2) Can I just construct an object one time and use it in different <? php ... ?> blocks? Thanks, Ming wrote: > 2) Can I just construct an object one time and use it in different <? > php ... ?> blocks? Well yes -- that's kind of the point. You create an object and then you use it as many times as you like. Also Google for: PHP Singleton Design Pattern -- Toby A Inkster BSc (Hons) ARCS http://tobyinkster.co.uk/ Geek of ~ HTML/SQL/Perl/PHP/Python/Apache/Linux Ming wrote: > Hi folks, > > I have a php file, it contains just a few php codes. The php codes I > need to use is to construct an object, and use it several times, from > html head until the las...

php
Hi Guys, Installed FreeBSD 5.1;fine Got Apache2, MySQL working. Installed php 4.3.4 ok Try to run phpMyAdmin (latest version), but somehow there isn't anything generated. Am I overlooking something? Like installing a lib? Any nfo is welcome Henk Lutgerink http://avatar.demon.nl henk lutgerink wrote: > Hi Guys, > > Installed FreeBSD 5.1;fine Got Apache2, MySQL working. > Installed php 4.3.4 ok > Try to run phpMyAdmin (latest version), but somehow there isn't anything > generated. > Am I overlooking something? > Like installing a lib? You don't say whether you've installed the phpMyAdmin port. (In /usr/ports/databases.) -- Bob London, UK echo Mail fefsensmrrjyaheeoceoq\! | tr "jefroq\!" "@obe.uk" Robert Downes wrote: > henk lutgerink wrote: >> Hi Guys, >> >> Installed FreeBSD 5.1;fine Got Apache2, MySQL working. >> Installed php 4.3.4 ok >> Try to run phpMyAdmin (latest version), but somehow there isn't anything >> generated. >> Am I overlooking something? >> Like installing a lib? > > You don't say whether you've installed the phpMyAdmin port. (In > /usr/ports/databases.) yes, I did install phpMyAdmin in /usr/ports/database. I got the feeling I still have to ./configure, make, make install? If so Please let me know. ps: server is running on http://avatar.demon.nl henk lutgerink wrote:...

php
hi all iv extracted a phptimesheet on my system but the webserver is not able to show the documents in html format...i mean..the <?php headers are also visible on the page... can any one help me out with this. linuxadmin wrote: > hi all > > iv extracted a phptimesheet on my system but the webserver is not able > to show the documents in html format...i mean..the <?php headers are > also visible on the page... > > can any one help me out with this. It sounds like a configuration error with your webserver---it would seem that it's not interpreting PHP files...

PHP
Hi I bought the PHP templates last winter and was trying to experiment with these web templates. I need the adaob 4.53 for PHP as indicatedf in the PHP manuals. The official site does not have it any more. Does anyone this zip file please ? If so, contact me at spiterijesmond@yahoo.co.uk If you use latest versions, the examples in the tutorials will not work as they should. Thanks Jesmond Jesmond: Some minutes ago I sent the file to your email Francisco jesmond.spiteri@visitmalta.com ha escrito: > Hi > I bought the PHP templates last winter and was trying to experiment > with these web templates. I need the adaob 4.53 for PHP as indicatedf > in the PHP manuals. > The official site does not have it any more. > Does anyone this zip file please ? If so, contact me at > spiterijesmond@yahoo.co.uk > If you use latest versions, the examples in the tutorials will not work > as they should. > > Thanks > Jesmond ...

US-CA: Los Angeles-Web Developer - PHP Developer - PHP Programmer - PHP
************************************************************** JobCircle.com is the largest regional job board in the Mid-Atlantic region, with tens of thousands of job offerings in PA, NJ, DE, MD, NY, and Washington D.C. To learn more, visit http://www.jobcircle.com?source=ng ************************************************************** Job Title: Web Developer - PHP Developer - PHP Programmer - PHP - MySQL Job Location: CA: Los Angeles Pay Rate: competitive Job Length: full time Start Date: 2011-05-06 Company Name: Cybercoders Contact: Shea Stone Phone: email only Fax: email only Description: Web Developer - PHP Developer - PHP Programmer - PHP - MySQL Web Developer - PHP Developer - PHP Programmer - PHP - MySQL - Javascript - HTML - CSS - Facebook - Skills Required - PHP, PHP4, PHP5, MySQL, Javascript, XHTML, DHTML, HTML5, HTML 5, Flash, actionscript, Facebook, Promotional, Marketing, PHP Developer, PHP Programmer, Web Developer Web Developer - PHP Developer - PHP Programmer - PHP - MySQL - Javascript - HTML - CSS - Facebook API If you are a PHP Programmer or Web Developer with strong skills in PHP Development, please read on! We are an award winning Interactive Agency with offices throughout the world. Were currently looking to add a PHP Developer, with skills in both Front End and Back End development, to our team in Venice, CA. In this role youll be developing Promotional / Marketing web ...

Parsing a php include (which also contains php code)
Hello, I am using the <?php include() ?> statement on my website for organizational purposes. However, one of my includes contains some PHP code. Is there any way for the server to actually parse the include? I've tried this before, and it did not parse the include. Rather, it included the file as just plain ASCII. ======================= /*EXAMPLE 1*/ /*index.php*/ .... <?php include('global/includes/footer.inc') ?> .... /*footer.inc*/ .... <p>&copy 1993-<?php echo date("Y") ?> Kingswood School. All rights reserved.</p> .... /*EXAMPLE 2*/ /*index.php*/ .... <?php include('global/includes/lastmod.php') ?> .... /*lastmod.php*/ .... <?php echo "This file was last modified: "; echo strftime("%A %B %d %Y"); include('whateverfilename.inc'); ?> ============================= I would like to be able to parse the include if it has php code, and in some cases, create nesting includes (an include within an include). Is this even possible? Any ideas? Any help is certainly appreciated. Thanks! Steven Borrelli Web Developer Kingswood School Steven Borrelli wrote: > Hello, > > I am using the <?php include() ?> statement on my website for > organizational purposes. However, one of my includes contains some > PHP code. Is there any way for the server to actually parse the > include? I've tried this before, and it did not parse the in...

Web resources about - php condition in a tabel with html and php - comp.lang.php

Conditions
Attractive ultra-simple new weather app for the iPhone, by Jake Marsh.

Precancerous condition - Wikipedia, the free encyclopedia
A precancerous condition (or premalignant condition ) is a generalized state associated with an increased risk of cancer . If left untreated, ...


Sarah Palin updates husband's condition after snowmobile crash
Sarah Palin updates husband's condition after snowmobile crash

'Comfortable' with market conditions: Ross
WL Ross Holdings will buy chemicals and plastics distributor Nexeo Solutions Holdings in a cash-and-stock deal valued at $1.67 billion.

Sarah Palin Gives Shocking Update About Her Husband’s Grim Condition
Sarah Palin Gives Shocking Update About Her Husband’s Grim Condition

FCC Closing In On Approving Charter-Time Warner Cable Merger, With Conditions: Report
... , The Wall Street Journal reported . The move could happen this week. The report says the federal greenlight would come with a number of conditions, ...

'Maze Runner' Director Updates Fans on Dylan O'Brien's Condition
'Maze Runner' Director Updates Fans on Dylan O'Brien's Condition

Rail conditions under scrutiny in Amtrak derailment investigation
Rail conditions under scrutiny in Amtrak derailment investigation

Feds Investigate Health Conditions in NYC Public Housing
Federal prosecutors are investigating health and safety conditions including lead paint in New York City homeless shelters and public housing ...

Resources last updated: 3/23/2016 9:55:09 PM