Thanks
preg_split("//", $text) works too. But it might be slow.
User Profile
Collapse
-
Add whitespace between letters
Does PHP has a function to add whitespace between letters?
Convert this "abc" to "a b c"? -
Create image in image
How can i put a created image in the other base image.
For example i create an image for "X" character using imagestring() and the same for "Y" character and now i want put these two images in a base image. How? -
Problem with EVAL
Hi
I have a code that when i use it, it crashes. May you suggest a solution for this code EXCEPT replaceing(characters such as quotation, double quotation, slash and back slash) and decoding the input?
Code:$input = 'inputs " text'; $output = eval('$text = "'.$input.'"; return $text;')
-
-
How to set RewriteBase to parent directory?
I have a .htaccess file in the directory called "test" in my "public_htm l"
I want to set an option for htaccess file that when i browse "test" directory, it include the "index.php" file that exists in "public_htm l" directory.
I think it may be like this but it didnt work.
Code:<IfModule mod_rewrite.c> RewriteEngine On RewriteBase ../
-
-
Well
Can you aid me to know more about this Event Handlers. How can i create something this?Leave a comment:
-
Thanks Dormilich
But if you had Firebug installed on Firefox you can see ondemand edits in page source. (by using Inspect Element)
if you run this code it will add in source coder:
Code:document.getElementById("my_element").onclick = 'function(){ alert("Hello!"); }';
Leave a comment:
-
An onclick handler like jQuery
In jQuery when I add onclick attribute for an element it doesn't add this attribute, but it works. So how does it works? -
Making floated element alignments to center
Is it possible to change #wrapper's inner elements alignments to center of page? I think its possible by using TABLE, but what about DIV?
Code:<style> #left { background: red; width: 100px; float: left; } #center { background: green; width: 200px; float: left; } #right { background: blue; width: 100px; float:
-
Stick to left
Hi
How can i stick tabs to left. Now it has 40px distance to left.
Code:<style> #Content { background-color: #fafafa; border: 1px solid #a2b6cb; padding: 10px; margin-top: -13px; } UL#Tabs { font-family: Verdana, Arial; font-size: 12px; font-weight: bold; list-style-type: none; padding-bottom:
-
Thank you
But how can i convert timestamp (seconds since unix epoch) to date?
(Converting a number to date)Leave a comment:
-
Convert getdate() to YYYY/MM/DD?
Is any solution to convert "1055901520 " to yyyy/mm/dd:
Code:$date = getdate(); print $date[0]; // return 1055901520
-
Set child element background same as father element background
How can i set the #contain div's background same as #wrapper background? (Child element background same as father elemenet background).
This source works in Firefox but how can i fix it in IE (IE6)?
Code:<!DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml">
-
Get running object name
Get running object name
Hi
Is it possible to get running object name using a command that defined in same object?
Code:<script> var test = function() { this.find = function() { alert('How can i know that this object is running as "a" variable?'); } } </script> <script> var a = new test();
-
Underline before variable name
What is the difference between these?
Code:var text = 'text'; var _text = 'text';
-
Thanks
But is it possible to return changed value (hi) using another object defining ('b' object), but not using 'a' object?
Something like last line.
Code:function test() { this.data = 'hello'; this.change = function() { this.data = 'hi'; } } var a = new test(); alert(a.data); // will return hello a.change(); alert(a.data); // will
Leave a comment:
-
Changing and value of variable in function
How can i change the value of a variant that defined in a function for ever?
Code:function test() { this.data = 'hello'; } function change() { var a = new test(); a.data = 'hi'; alert(a.data); } change(); // return hi var b = new test(); alert(b.data); // return hello
-
Getting CSS containt using JS from <style> tag
How can i get css contains of an element.
When i use alert(document. getElementById( 'mydiv').style. opacity) it will return empty.
Code:<style> #mydiv{ background:#000000; opacity:0.4; } </style> <div id="mydiv">inner</div>
Code:<script> function getOpacity(){ alert(document.getElementById('mydiv').style.opacity);
No activity results to display
Show More
Leave a comment: