Hellos,
I would like to do a simple telephone list. The csv data I do get from a csv list from an active directory powershell export.
the csv is comma seperated and it's looking that way:
#TYPE Selected.Microsoft.ActiveDirectory.Management.ADUser
name,"officephone"
firstnameA, lastnameA,"+49 12345 555 123"
firstnameB, lastnameB,"+49 12345 555 124"
firstnameC, lastnameC,"+49 12345 555 125"
firstnameD, lastnameD,"+49 12345 555 126"
So, and I would like to display it like that way (firstnameA, lastnameA in one row and the three digit number in the second row:
firstnameA, lastnameA 123
firstnameB, lastnameB 124
firstnameC, lastnameC 125
firstnameD, lastnameD 126
till yet I have that code:
<?php
echo "<html><body><table>
";
$phonebook = fopen("database/itlocal.csv", "r");
while (($line = fgetcsv($f)) !== false) {
echo "<tr class='departmenttext'>";
foreach ($line as $cell) {
echo "<td>" . htmlspecialchars($cell) . "</td>";
}
echo "</tr>
";
}
fclose($f);
echo "
</table></body></html>";
?>
How can I skip the first two lines and also cut the telephone number I'd like to have it?
thanks in advance