Posts
 
Reputation
Joined
Last Seen
0 Reputation Points
100% Quality Score
Upvotes Received
1
Posts with Upvotes
1
Upvoting Members
1
Downvotes Received
0
Posts with Downvotes
0
Downvoting Members
0
0 Endorsements
Ranked #4K
~2K People Reached
Favorite Forums
Favorite Tags
Member Avatar for piotrekw

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 …

Member Avatar for diafol
0
124
Member Avatar for piotrekw

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 …

Member Avatar for piotrekw
0
162
Member Avatar for piotrekw

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?

Member Avatar for aquilax
0
105
Member Avatar for Squit

hello ppl :) i use .htaccess for my PHP site to redirect without changing the URL in the adress bar for example: [url]http://www.example.com/news/This.is.a.new[/url] my .htaccess sends from /news/ folder sends the user to [url]http://example.com/news.php?id=142151[/url] ... and i can't send another variable to the [url]http://www.example.com/news/[/url] folder because is redirected to news.php?id... …

Member Avatar for Squit
0
1K
Member Avatar for piotrekw

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: " + …

Member Avatar for piotrekw
0
174
Member Avatar for piotrekw

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 …

Member Avatar for piotrekw
0
133
Member Avatar for piotrekw

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 …

Member Avatar for blocblue
0
83