Hello,
I am new to PHP and I am trying to create a web mashup with amazon and ebay. My problem is that I have a function called "printCategoryItems()" which sets a variable called $keyword. I want to use this variable elsewhere in the code but I can't get it to work. For Example,
<?php
function printCategoryItems(){
if(isset($_GET['keyword'])){
$keyword = $_GET['keyword'];
...
}
}
...
$query = $keyword;
...
This is the sort of thing I am trying to do but I end up getting an Undefined variable error for keyword. Is there a way for me to do what I'm trying to do?
Thanks for your help in advance.
(Only have Java Programming Experience)