- Upvotes Received
- 1
- Posts with Upvotes
- 1
- Upvoting Members
- 1
- Downvotes Received
- 0
- Posts with Downvotes
- 0
- Downvoting Members
- 0
7 Posted Topics
Hi I write a bbcode and I have a problem. I have this code: function bbcode($tresc) { //... $tresc=str_replace("\n",'<br />',$tresc); $tresc=preg_replace('/\[\-\]([\w\W]+?)\n?(?=(?:(?:\[\-\])|(?:\[\/lista\])))/is','<li>\\1</li>',$tresc); $tresc=preg_replace("/\[lista\](.*?)\[\/lista\]/is",'<ul>\\1</ul>',$tresc); return $tresc; } I would like to in the tag [list] [/ list] - sign <br /> - turned to back to \n I do not know how … ![]() | |
I have e.g. example: $some_text='some example text [title=some_title]some title[/title] next text'; and I want make function, which will search for the word. I make function: function text_check($text,$search_word) { $text = preg_replace('/'.$search_word.'/i','<span style="color: red;">'.$search_word.'</span>',$text); return $text; } $search='title'; echo text_check($some_text,$search); How to construct a function of instruction which will steer clear … | |
Hi How to write code mod-rewrite for 3 variables. Ma actualy code: [CODE]AddType text/x-component .htc AddType application/x-httpd-php .html Options FollowSymLinks RewriteEngine On RewriteBase / RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^([^/]+)/([^/]+)$ index.php?s=$1&pods2=$2&pods3=$3 [L][/CODE] variables $1 and $2 correctly work, but $3 does not work, what can I do? | |
Re: If your $_GET['page']: [CODE]AddType text/x-component .htc AddType application/x-httpd-php .html Options FollowSymLinks RewriteEngine On RewriteBase / RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^([^/]+)$ index.php?page=$1 [L][/CODE] | |
Hi, I would do result loop where the only exists title attribute and how to make the result of the title attribute? This code does not work: [CODE]<html> <head> <script type="text/javascript"> function ppp() { var i=0; for(i=0;i<9;i++) { var idm='a' + i; var AttributeA=document.getElementById(idm).getAttributeNode("title"); if (AttributeA) { document.write("number: " + … | |
Does anyone know what is wrong, that this script in this case, a bad number of days in the difference in dates? The difference should be 2 days - the script shows 1 day. If the difference is in the same month is OK. [CODE]<script type="text/javascript"> var date_from = new … | |
Needs to achieve such an effect: [CODE]$dateall=$year.$month.$day; $arr_from=array('20120401','20120416','20120510'); $arr_to=array('20120405','20120425','20120515'); if($dateall>=$arr_from[0] && $dateall<=$arr_to[0] || $dateall>=$arr_from[1] && $dateall<=$arr_to[1] || ...) { $calendar .= '<td class="reservation"><span title="reservation" id="id'.$year.$month.$day.'">'.$day.'</span></td>'; } else if //other conditions [/CODE] The above code works fine. But I need to rewrite this code as: [CODE]if($dateall>=$arr_from[$j] && $dateall<=$arr_to[$j]) // something like … |
The End.