I don't think I am explaining it right, I just want to take the url http://domain.com/index.php?category=bedroom and replace $sofa with $bedroom and have the $bedroom pull the correct url. I think a print or echo is correct not sure? If it helps here is what the included php file contains
<?php
$sofa = "http://pathtospreadsheet.com";
$bedroom = "http://pathtospreadsheet.com";
$dining = "http://pathtospreadsheet.com";
?>
ignore $myarray was attempting to use to make work as it gets the value from text file. The value is a plain url.
how do you change this code
<?PHP
function readCSV($csvFile){
$file_handle = fopen($csvFile, 'r');
while (!feof($file_handle) ) {
$line_of_text[] = fgetcsv($file_handle, 1024);
}
fclose($file_handle);
return $line_of_text;
}
$csvFile = "$sofas";
$csv = readCSV($csvFile);
//print_r($csv);
?>
to this just using value in the url
<?PHP
function readCSV($csvFile){
$file_handle = fopen($csvFile, 'r');
while (!feof($file_handle) ) {
$line_of_text[] = fgetcsv($file_handle, 1024);
}
fclose($file_handle);
return $line_of_text;
}
$csvFile = "$bedroom";
$csv = readCSV($csvFile);
//print_r($csv);
?>