My code is as follows:
foreach ($row_result as $results)
{
$f = fopen("jigsaw.csv", "a+");
$new_array = array();
$content = $results->findElement(WebDriverBy::className('seo-company'))->geTtext();
$test = array();
if ($i == 1)
{
$Orgnisation_name = $content;
$concate = array_push($test,$Orgnisation_name);
echo "\n";
}
if ($i == 2)
{
echo $Website = $content;
echo "\n";
}
if ($i == 3)
{
echo $HeadQuarters = $content;
echo "\n";
}
if ($i == 4)
{
echo $Phone = $content;
echo "\n";
}
if ($i == 5)
{
echo $Industries = $content;
echo "\n";
}
if ($i == 6)
{
echo $Employees = $content;
echo "\n";
}
if ($i == 7)
{
echo $Revenue = $content;
echo "\n";
}
if ($i == 8)
{
echo $Ownership = $content;
echo "\n";
}
$i++;
}
Here I want to push one by one element into concate array and finally save it into mysql php database.
When I try to push it into concate array its printing me 1 which is wrong.
What should I do?