Search found 6 matches

by menator01
Fri May 16, 2014 9:50 am
Forum: PHP coding => General
Topic: Retrieving text
Replies: 3
Views: 1042

Re: Retrieving text

use explode and then array_pop
by menator01
Thu May 15, 2014 3:06 am
Forum: PHP coding => General
Topic: Retrieving text
Replies: 3
Views: 1042

Re: Retrieving text

Code: Select all

<?php
$sms = 'username John';
$sms = explode(' ', $sms);
echo $sms[1];
?>
Explode will turn the string into an array
by menator01
Sun May 11, 2014 11:29 pm
Forum: PHP coding => General
Topic: Retrieving text
Replies: 3
Views: 1042

Re: Retrieving text

You could use explode to do that. :)
by menator01
Sat May 10, 2014 4:16 pm
Forum: PHP General
Topic: how to pass the selected id to another page
Replies: 2
Views: 1028

Re: how to pass the selected id to another page

You could pass it in a link like

Code: Select all

<a href="nextpage.php?id=$id">nextpage</a>
or have a look at sessions.
by menator01
Sat May 10, 2014 4:09 pm
Forum: PHP General
Topic: Array sort question
Replies: 1
Views: 933

Re: Array sort question

You could have a look at array_multisort and see if that helps..
by menator01
Sat May 10, 2014 3:35 pm
Forum: PHP coding => General
Topic: Looking for a match in array
Replies: 0
Views: 581

Looking for a match in array

I have tried several approaches on this and can't seem to get the results expected. any help would be great. $log = file(some/path/to/log_file); <?php $array = array('client','clientfields'); //$i=0; foreach($log as $key => $val) { //if(stristr(strtolower($val),':',true) === $array[$i]) if(stristr(s...