Ernijs_E Posted April 21, 2010 Report Share Posted April 21, 2010 Sveiki.. Varbūt kāds zin funkciju(man liekas), kas aizstāj vārdus, piem. kuce aizstāj ar suns.. Vai Suns vietā tukšums! Quote Link to comment Share on other sites More sharing options...
marcis Posted April 21, 2010 Report Share Posted April 21, 2010 http://lv.php.net/str_replace http://lv.php.net/strtr utt Quote Link to comment Share on other sites More sharing options...
Ernijs_E Posted April 21, 2010 Author Report Share Posted April 21, 2010 precīzu piemēru vari? Quote Link to comment Share on other sites More sharing options...
rATRIJS Posted April 21, 2010 Report Share Posted April 21, 2010 Lol tu vispaar atveeri to pirmo linku? Quote Link to comment Share on other sites More sharing options...
Ernijs_E Posted April 21, 2010 Author Report Share Posted April 21, 2010 <?php require "lgsl_class.php"; $server_list = lgsl_query_cached_all("s"); $server_list = lgsl_sort_servers($server_list); foreach ($server_list as $server) { $misc = lgsl_server_misc($server); $server = lgsl_server_html($server); $output .= " <div class='box' id='server'> <p class='h1'> {$misc['name_filtered']} </p> <img src='{$misc['image_map']}' alt='{$server['s']['map']}' /><br /> <p>Spēlētāji: <span style='color:#4d9b00;'>{$server['s']['players']}</span>/<span style='color:#c90000;'>{$server['s']['playersmax']}</span></p> <p>Karte: <b>{$server['s']['map']}</b></p> <p>Nāc uzspēlē: <b>{$server['b']['ip']}:{$server['b']['c_port']}</b></p> <br /> <br /> </div> " ; } ?> {$misc['name_filtered']} ... šis man izvada nosaukumu COUNTERSTRIKE.LV PUB, bet to COUNTERSTRIKE.LV man vajadzētu dabūt nost, kā? Quote Link to comment Share on other sites More sharing options...
waplet Posted April 21, 2010 Report Share Posted April 21, 2010 str_replace("kuce","suns",$teksts); Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.