...

View Full Version : Resolved Any idea how to solve this?



Trki
01-08-2012, 02:32 PM
Hi i know php with mysql ... but i am not so great in this how i would want.

I have problem... to example:

i have:


$string_array[2]="Peter is man.";

$string_array[1]="man";

And i want echo $result ... Peter is. How to do that? :/ If u would know the soltion i would be very happy.

Btw this looks like very nice forum.

BluePanther
01-08-2012, 03:39 PM
Your English isn't the best (guessing not your first language), but I THINK I know what you're trying to say. You have an array, and you want to echo $string_array[2] - $string_array[1]?


echo trim(str_replace($string_array[1],'',$string_array[2])); // Will echo 'Peter is'

Trki
01-08-2012, 04:09 PM
no i am not :) i am from slovakia... and... thx for this function ... before i read your comment i was thinking... what i actually need to do... i need remove... man... or... remove... replace... or wait :D on replace is a function and i know it ... i tried it and it was worked well and dann i came here for delete this topic and i found here your comment. :) But thx :) i think i can remove the topic now ? or let it here?

BluePanther
01-08-2012, 04:45 PM
no i am not :) i am from slovakia... and... thx for this function ... before i read your comment i was thinking... what i actually need to do... i need remove... man... or... remove... replace... or wait :D on replace is a function and i know it ... i tried it and it was worked well and dann i came here for delete this topic and i found here your comment. :) But thx :) i think i can remove the topic now ? or let it here?

Haha, I usually solve problems by saying them outloud - freaks people out in my house :P.

Generally, topics aren't removed - they're set to resolved. Edit your first post, click 'go advanced' and set the topic to resolved in there :).

Trki
01-08-2012, 06:34 PM
Haha, I usually solve problems by saying them outloud - freaks people out in my house :P.

Generally, topics aren't removed - they're set to resolved. Edit your first post, click 'go advanced' and set the topic to resolved in there :).

hh :D:D i can't say it becase i dont hear myself... music ... :D



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum