egturnkey Posted March 13, 2010 Share Posted March 13, 2010 Hello dear friends, One of the most lovely idea i was searching for was for 50-50% text show. If i have $text_1 = "i love phpfreak"; and $text_2 = "hello my world"; and let says i want $final = "50-50% show btween both text_1/test_2"; how to make $final shows either $text_1 or $text_2 with chance 50% to each thanks in advance Link to comment https://forums.phpfreaks.com/topic/195099-50-50-show-text-data/ Share on other sites More sharing options...
jskywalker Posted March 13, 2010 Share Posted March 13, 2010 * count how many times each text is show * if counts differ, show the one which is show less times * if count are equal, pick a random one from both... Link to comment https://forums.phpfreaks.com/topic/195099-50-50-show-text-data/#findComment-1025562 Share on other sites More sharing options...
egturnkey Posted March 13, 2010 Author Share Posted March 13, 2010 * count how many times each text is show * if counts differ, show the one which is show less times * if count are equal, pick a random one from both... thanks, upon your idea . i'm feeling i'm so close to understand it so please keep with me. I will create database table with 2 fields text_1 and text_2 it will record how many times text_1 shown and text_2 shown if both are equal then it will show text_1 then next time it will compare then it found text_1 > text_2 then it shown text_2 ect... is that you mean !! i think it is too complex to me to write it but i will try. Link to comment https://forums.phpfreaks.com/topic/195099-50-50-show-text-data/#findComment-1025568 Share on other sites More sharing options...
jskywalker Posted March 13, 2010 Share Posted March 13, 2010 you got it..... But if you only have 2 options (text1/text2) than if would be simpler to remind the one you showed last time. if you showed text1 last, than next time show text2 if you showed text2 last, than next time show text1 Link to comment https://forums.phpfreaks.com/topic/195099-50-50-show-text-data/#findComment-1025573 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.