Jump to content

[SOLVED] Calling a Function


Lamez

Recommended Posts

I am new to functions to start off with!

 

Alright how do I call a function from another page?

 

for an example

<?php //poop.php
function displayAll(){
echo "poop";
}
?>

in my new page new.php

<?php
include ("poop.php");
displayAll();
?>

 

is that syntax right?

 

I am not sure on how to do this.

Link to comment
https://forums.phpfreaks.com/topic/82149-solved-calling-a-function/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.