PHP 5.6.30 Released

PHP-Handbuch

von:
Mehdi Achour
Friedhelm Betz
Antony Dovgal
Nuno Lopes
Hannes Magnusson
Georg Richter
Damien Seguy
Jakub Vrana
2017-01-21
Herausgegeben von: Peter Cowburn
Bei der Übersetzung wirkten mit:
Oliver Albers
Florian Anderiasch
Christoph Michael Becker
Arne Blankerts
Cornelia Boenigk
Patrick Eigensatz
Hartmut Holzgraefe
Daniel Jänecke
Carola Köhntopp
Hakan Kücükyilmaz
Raphael Michel
Sebastian Nohn
Karl Pflästerer
Nikita Popov
Dirk Randhahn
Thorsten Rinne
Martin Samesch
Mark Wiesemann
Tim Hollmann
add a note add a note

User Contributed Notes 2 notes

up
-13
webtechhelp dot org at gmail dot com
12 days ago
Fibonacci Series Program in PHP

<?php

function printFibonacci($n)
{

 
$first = 0;
 
$second = 1;

  echo
"Fibonacci Series \n";

  echo
$first.' '.$second.' ';

  for(
$i = 2; $i < $n; $i++){

   
$third = $first + $second;

    echo
$third.' ';

   
$first = $second;
   
$second = $third;

    }
}
 
/* Function call to print Fibonacci series upto 6 numbers. */

printFibonacci(6);

?>

http://webtechhelp.org
up
-16
webtechhelp dot org at gmail dot com
12 days ago
How to generate series in php with number gets multipled by 6 after every 2 numbers

<?php
function getNumber($i) {
    if (
$i % 3 == 0) {
        return
$i * 2;
    } else {
        return
$i;
    }
}

for (
$i = 1; $i <= 1000; $i++) {
    echo
getNumber($i) . "\n";
}
?>
To Top