I have a csv file with traceroutes,
the last entry in every row is the target IP,
but as there are variable no of records in every row …so I am having difficulty
I want to collect the last entry from every row into a column
how do I do that?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
PHP has a nice function fgetcsv().
Example:
To collect the value from the last cell in each row, do the following inside the
forloop:Although, this only needs to be done if the number of cells in each row varies or if you actually don’t know.
Otherwise do what’s in the example above and just specify it; e.g. if the last cell in each row is always in column C then you collect the value from
$data[2](in theforloop)