PROJETO DE EXTENSÃO I - AGRONOMIA.pdf AGRONOMIAAGRONOMIA
LabMM4 (T12 - 12/13) - Estruturas de controlo
1. PHP: Estruturas de controlo
Carlos Santos
LabMM 4 - NTC - DeCA - UA
Aula 12, 04-04-2013
2. Strings: diferença entre aspas e pelicas
Em PHP as aspas e as pelicas podem ter resultados diferentes...
• <?php
$name = "Oliver";
$output = "Hello $name. This is one line.nAnd this is
another line.";
echo $output;
?>
• no código fonte (source) da página HTML
• Hello Oliver. This is one line.
And this is another line.
3. Strings: diferença entre aspas e pelicas
Em PHP as aspas e as pelicas podem ter resultados diferentes...
• <?php print 'This string will $prt exactly as it's n
declared.'; ?>
• no código fonte da página HTML
• This string will $prt exactly as it's n declared.