Hi,
I have a function in my script and this will take the parameter from the url to give an output. The output has almost 10 variables($age, $name....). I want to use this function in my other files(php) but I do not want to print all the output(10). Depending on the page I am I want to display 2 out 10 or 3 out of 10 variables. I am sure its possible but not sure how to get it.
For example,
<?php
Function show_data($id) {
$link = "http://abc.com?id=$_GET['id']";
//I will do fopen($link,r) and then get the data stored from the link.
//After doing some text manipulation like adding uppercase, removing "" etc I will have the output stored as
$name= $data[0];
$age= $data[2];
//etc..
//then close the function
?>
So I want to use this function to just display the required output based on the place/page where I want to, something like this :
//Call the above function and then just show age in file_one.php
//Call the above function and then just show name in file_two.php
Please help me out and let me know if I am clear in explaining this.
thanks
pragan.




Bookmarks