hi,
I have 2 small problems.
First of all, if I do an foreach() { echo"value,"; } , how can I take the last "," away?
exemple: "ar1,ar2,ar3,ar4," ??? I just want to remove the last ",".
then same formula, but other problem with system("");
I want to put the output of the array into the system() put it don't work.???
<?php
$weekday[0] = "m"; //monday
$weekday[2] = "w" // w....
$weekday[5] = "s";
$weekday[6] = "su";
$time_h = "16";
$time_m = "30";
function get_weekday($weekday) {
if(is_array($weekday)) {
foreach ($weekday as $value) {
echo"$value,";
}
}
}
system("at $time_h:$time_m /every:get_weekday($weekday) \"c:/test.bat\"");
?>
How do I fix this problems? Thx for any help