The concept of NULL in SQL, including MySQL, is a little hard to get at first, so the NULL keyword is tough to use as well.
This blog post helps to clarify it.
Technology, primarily Information Technology
The concept of NULL in SQL, including MySQL, is a little hard to get at first, so the NULL keyword is tough to use as well.
This blog post helps to clarify it.
This is a simple technique to extract the filename extension from a filename. It could easily be adapted to extract the filename from a path or a query string from a URL by changing the first parameter of the explode() function.
$extension = end(explode('.', $filename)); |
Sometimes the text in a form field is put there primarily for the purpose of being copied to the clipboard.
In these cases a little JavaScript will smooth the process, selecting the full contents of the field on the first click.
Place the following script in the
section of your page:1 2 3 4 5 | <script type="text/JavaScript"> function highlight(field) { field.focus(); field.select(); }</script> |
Then place onClick='highlight(this);' as an attribute to any field you want treated this way:
1 | <input type="text" name="myfield" size="20" value="mytext" onClick='highlight(this);'> |
[sourcecode language="php"]
# show full path of current dir in linux command prompt
PS1="[\u@\h \w]\\$ "
[/sourcecode]
WordPress can have the disconcerting habit of inserting a space between the < and ?php when you want to show a code block in a syntax-highlighter plugin. To cure this, go into your WP Admin page, select the Settings menu, Select the writing submenu, then uncheck the WordPress should correct invalidly nested XHTML automatically option.